Class Html


  • public final class Html
    extends Object
    The implementation of the <html/> element in the http://jabber.org/protocol/xhtml-im namespace.

    This class is immutable.

    See Also:
    XEP-0071: XHTML-IM
    • 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.