public final class Html
extends java.lang.Object
The implementation of the <html/>
element in the http://jabber.org/protocol/xhtml-im
namespace.
This class is immutable.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
|
Constructor and Description |
---|
Html(org.w3c.dom.Document document)
Creates an empty HTML document with an empty body.
|
Html(java.lang.String xhtmlContent)
Creates an HTML document from a string source (body).
|
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
getBody()
Gets the body of this XHTML document.
|
java.lang.String |
getContent()
Gets XHTML content of the body, i.e. the content between the
<body></body> element. |
java.lang.String |
toString() |
public static final java.lang.String NAMESPACE
public Html(org.w3c.dom.Document document)
Creates an empty HTML document with an empty body. Use this constructor if you want to create your body element manually with DOM operations.
document
- The document.getBody()
public Html(java.lang.String xhtmlContent) throws org.xml.sax.SAXException
Creates an HTML document from a string source (body).
xhtmlContent
- The body element as string, e.g. <p>Hi</p>
.org.xml.sax.SAXException
- If the input string could not be parsed.getContent()
public final org.w3c.dom.Element getBody()
Gets the body of this XHTML document. Use this to append child nodes.
public final java.lang.String getContent()
Gets XHTML content of the body, i.e. the content between the <body></body>
element.
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.