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