Package org.loboevolution.html.parser
Class XHtmlParser
java.lang.Object
org.loboevolution.html.parser.XHtmlParser
The XHtmlParser class is an HTML DOM parser. This parser provides
the functionality for the standard DOM parser implementation
DocumentBuilderImpl. This parser class
may be used directly when a different DOM implementation is preferred.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXHtmlParser(UserAgentContext ucontext, Document document) Constructs a XHtmlParser.XHtmlParser(UserAgentContext ucontext, Document document, boolean needRoot) Constructs a XHtmlParser. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDecodeEntities(String elementName) isDecodeEntities.voidparse(LineNumberReader reader) parse.voidparse(LineNumberReader reader, Node parent) This method may be used when the DOM should be built under a given node, such as when innerHTML is used in Javascript.voidParses HTML given by a Reader.voidThis method may be used when the DOM should be built under a given node, such as when innerHTML is used in Javascript.
-
Field Details
-
MODIFYING_KEY
Constant MODIFYING_KEY="cobra.suspend"- See Also:
-
-
Constructor Details
-
XHtmlParser
Constructs a XHtmlParser.- Parameters:
ucontext- The user agent context.document- A W3C Document instance.
-
XHtmlParser
Constructs a XHtmlParser.- Parameters:
ucontext- The user agent context.document- An W3C Document instance.needRoot- a boolean.
-
-
Method Details
-
isDecodeEntities
isDecodeEntities.
- Parameters:
elementName- aStringobject.- Returns:
- a boolean.
-
parse
This method may be used when the DOM should be built under a given node, such as when innerHTML is used in Javascript.- Parameters:
reader- A LineNumberReader for the document.parent- The root node for the parsed DOM.- Throws:
IOException- if any.SAXException- if any.
-
parse
Parses HTML given by a Reader. This method appends nodes to the document provided to the parser.- Parameters:
reader- An instance of Reader.- Throws:
IOException- if any.SAXException- if any.
-
parse
This method may be used when the DOM should be built under a given node, such as when innerHTML is used in Javascript.- Parameters:
reader- A document reader.parent- The root node for the parsed DOM.- Throws:
IOException- if any.SAXException- if any.
-
parse
parse.
- Parameters:
reader- aLineNumberReaderobject.- Throws:
IOException- if any.SAXException- if any.
-