public class XHTMLExtension extends java.lang.Object implements PacketExtension
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 and Description |
---|
XHTMLExtension() |
Modifier and Type | Method and Description |
---|---|
void |
addBody(java.lang.String body)
Adds a body to the packet.
|
java.util.List<java.lang.String> |
getBodies()
Returns a List of the bodies in the packet.
|
int |
getBodiesCount()
Returns a count of the bodies in the XHTML packet.
|
java.lang.String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
java.lang.String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element.
|
java.lang.String |
toXML()
Returns the XML representation of a XHTML extension according the specification.
|
public java.lang.String getElementName()
getElementName
in interface PacketExtension
public java.lang.String getNamespace()
getNamespace
in interface PacketExtension
public java.lang.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 java.util.List<java.lang.String> getBodies()
public void addBody(java.lang.String body)
body
- the body to add.public int getBodiesCount()