Class JsoupXmlParser

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

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

    • JsoupXmlParser

      public JsoupXmlParser()
  • Method Details

    • parse

      public IDocumentNode parse (InputStream xmlStream, 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:
      xmlStream - 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 xml)
      Description copied from interface: IXmlParser
      Parses XML provided as a String.
      Specified by:
      parse in interface IXmlParser
      Parameters:
      xml - the Xml string
      Returns:
      a document node