Class JsoupXmlParser
java.lang.Object
com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupXmlParser
- All Implemented Interfaces:
IXmlParser
Class that uses JSoup to parse HTML.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(InputStream xmlStream, String charset) Parses XML provided as anInputStreamand an encoding.Parses XML provided as aString.private INodewrapJsoupHierarchy(Node jsoupNode) Wraps JSoup nodes into pdfHTMLINodeclasses.
-
Field Details
-
logger
private static org.slf4j.Logger loggerThe logger.
-
-
Constructor Details
-
JsoupXmlParser
public JsoupXmlParser()
-
-
Method Details
-
parse
Description copied from interface:IXmlParserParses XML provided as anInputStreamand an encoding.- Specified by:
parsein interfaceIXmlParser- Parameters:
xmlStream- the Xml streamcharset- the character set. Ifnullthen parser should detect encoding from stream.- Returns:
- a document node
- Throws:
IOException- Signals that an I/O exception has occurred.
-
parse
Description copied from interface:IXmlParserParses XML provided as aString.- Specified by:
parsein interfaceIXmlParser- Parameters:
xml- the Xml string- Returns:
- a document node
-
wrapJsoupHierarchy
-