public class XHTMLExtension extends Object implements PacketExtension
The following link summarizes the requirements of XHTML IM: Valid tags.
Warning: this is an non-standard protocol documented by XEP-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(String body)
Adds a body to the packet.
|
List<String> |
getBodies()
Returns a List of 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.
|
public XHTMLExtension()
public String getElementName()
getElementName in interface PacketExtensionpublic String getNamespace()
getNamespace in interface PacketExtensionpublic 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 PacketExtensionpublic List<String> getBodies()
public void addBody(String body)
body - the body to add.public int getBodiesCount()