Class Html
- java.lang.Object
-
- rocks.xmpp.extensions.xhtmlim.model.Html
-
public final class Html extends Object
The implementation of the<html/>
element in thehttp://jabber.org/protocol/xhtml-im
namespace.This class is immutable.
- See Also:
- XEP-0071: XHTML-IM
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
getBody()
Gets the body of this XHTML document.String
getContent()
Gets XHTML content of the body, i.e. the content between the<body></body>
element.String
toString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
http://jabber.org/protocol/xhtml-im- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Html
public Html(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.- Parameters:
document
- The document.- See Also:
getBody()
-
Html
public Html(String xhtmlContent) throws SAXException
Creates an HTML document from a string source (body).- Parameters:
xhtmlContent
- The body element as string, e.g.<p>Hi</p>
.- Throws:
SAXException
- If the input string could not be parsed.- See Also:
getContent()
-
-
Method Detail
-
getBody
public final Element getBody()
Gets the body of this XHTML document. Use this to append child nodes.- Returns:
- The body.
-
getContent
public final String getContent()
Gets XHTML content of the body, i.e. the content between the<body></body>
element.- Returns:
- The XHTML content as string.
-
-