Class JsoupHtmlParser

java.lang.Object
com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupHtmlParser
All Implemented Interfaces:
IXmlParser

public class JsoupHtmlParser extends Object implements IXmlParser
Class that uses JSoup to parse HTML.
  • Constructor Details

    • JsoupHtmlParser

      public JsoupHtmlParser()
  • Method Details

    • parse

      public IDocumentNode parse (InputStream htmlStream, String charset) throws IOException
      Description copied from interface: IXmlParser
      Parses XML provided as an InputStream and an encoding.
      Specified by:
      parse in interface IXmlParser
      Parameters:
      htmlStream - the Xml stream
      charset - the character set. If null then parser should detect encoding from stream.
      Returns:
      a document node
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • parse

      public IDocumentNode parse (String html)
      Description copied from interface: IXmlParser
      Parses XML provided as a String.
      Specified by:
      parse in interface IXmlParser
      Parameters:
      html - the Xml string
      Returns:
      a document node