|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.packet.XHTMLExtension
public class XHTMLExtension
An XHTML sub-packet, which is used by XMPP clients to exchange formatted text. The XHTML extension is only a subset of XHTML 1.0.
The following link summarizes the requirements of XHTML IM: Valid tags.
Warning: this is an non-standard protocol documented by JEP-71. Because this is a non-standard protocol, it is subject to change.
Constructor Summary | |
---|---|
XHTMLExtension()
|
Method Summary | |
---|---|
void |
addBody(String body)
Adds a body to the packet. |
Iterator |
getBodies()
Returns an Iterator for the bodies in the packet. |
int |
getBodiesCount()
Returns a count of the bodies in the XHTML packet. |
String |
getElementName()
Returns the XML element name of the extension sub-packet root element. |
String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element. |
String |
toXML()
Returns the XML representation of a XHTML extension according the specification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XHTMLExtension()
Method Detail |
---|
public String getElementName()
getElementName
in interface PacketExtension
public String getNamespace()
getNamespace
in interface PacketExtension
public String toXML()
<message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack"> <subject>Any subject you want</subject> <body>This message contains something interesting.</body> <html xmlns="http://jabber.org/protocol/xhtml-im"> <body><p style='font-size:large'>This message contains something <em>interesting</em>.</p></body> </html> </message>
toXML
in interface PacketExtension
public Iterator getBodies()
public void addBody(String body)
body
- the body to add.public int getBodiesCount()
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |