public class XHTMLExtension extends Object implements ExtensionElement
The following link summarizes the requirements of XHTML IM: XEP-0071: XHTML-IM.
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
| Constructor and Description |
|---|
XHTMLExtension() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBody(CharSequence body)
Adds a body to the packet.
|
static XHTMLExtension |
from(Message message) |
List<CharSequence> |
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.
|
XmlStringBuilder |
toXML()
Returns the XML representation of a XHTML extension according the specification.
|
public static final String ELEMENT
public static final String NAMESPACE
public XHTMLExtension()
public String getElementName()
getElementName in interface NamedElementpublic String getNamespace()
getNamespace in interface ExtensionElementpublic XmlStringBuilder 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>
public List<CharSequence> getBodies()
public void addBody(CharSequence body)
body - the body to add.public int getBodiesCount()
public static XHTMLExtension from(Message message)