|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.Message
madkit.messages.XMLMessage
public class XMLMessage
A message that carries a XML document. You can set the document either through a string or a pre-parsed DOM tree. This class is optimized in the sense that it will change representations only if needed (i.e. constructed with a String and used through the getDocument() accessor). You need the xerces XML parser to use this class.
Field Summary | |
---|---|
protected Document |
doccontent
The xml content as a Document (null if the content is defined as a string) |
protected java.lang.String |
strcontent
The xml content as a String (null if the content is defined as a Document) |
Constructor Summary | |
---|---|
XMLMessage(Document d)
Setup a XMLMessage with the xml document setup as a Document |
|
XMLMessage(java.lang.String s)
Setup a XMLMessage with the xml document setup as a string. |
Method Summary | |
---|---|
Document |
getDocument()
Returns the XMLMessage content as a document. |
java.lang.String |
getString()
Returns the XMLMessage content as a string. |
java.lang.String |
toString()
This method returns a string for the XML document set in this message. |
Methods inherited from class madkit.kernel.Message |
---|
clone, getCreationDate, getReceiver, getSender |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Document doccontent
protected java.lang.String strcontent
Constructor Detail |
---|
public XMLMessage(java.lang.String s)
s
- A valid (i.e. parseable) text XML documentpublic XMLMessage(Document d)
d
- A well-formed DOM objectMethod Detail |
---|
public java.lang.String getString()
public Document getDocument()
public java.lang.String toString()
toString
in class Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |