Package org.jsoup.parser
Class XmlTreeBuilder
java.lang.Object
org.jsoup.parser.XmlTreeBuilder
public class XmlTreeBuilder extends Object
Use the
XmlTreeBuilder when you want to parse XML without any of the HTML DOM rules being applied to the
document.
Usage example: Document xmlDoc = Jsoup.parse(html, baseUrl, Parser.xmlParser());
- Author:
- Jonathan Hedley
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XmlTreeBuilder() -
Method Summary
Modifier and Type Method Description protected ElementcurrentElement()protected voiderror(String msg)If the parser is tracking errors, and an error at the current position.protected voidinitialiseParse(Reader input, String baseUri, Parser parser)protected booleanprocess(org.jsoup.parser.Token token)protected booleanprocessEndTag(String name)protected booleanprocessStartTag(String name)booleanprocessStartTag(String name, Attributes attrs)protected voidrunParser()
-
Field Details
-
Constructor Details
-
XmlTreeBuilder
public XmlTreeBuilder()
-
-
Method Details
-
initialiseParse
-
process
protected boolean process(org.jsoup.parser.Token token) -
runParser
protected void runParser() -
processStartTag
-
processStartTag
-
processEndTag
-
currentElement
-
error
If the parser is tracking errors, and an error at the current position.- Parameters:
msg- error message
-