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
-
Method Summary
Modifier and TypeMethodDescriptionString
protected void
initialiseParse
(Reader input, String baseUri, Parser parser) protected void
popStackToClose
(org.jsoup.parser.Token.EndTag endTag) If the stack contains an element with this tag's name, pop up the stack to remove the first occurrence.protected boolean
process
(org.jsoup.parser.Token token) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
parser
-
-
Constructor Details
-
Method Details
-
initialiseParse
-
defaultNamespace
public String defaultNamespace() -
process
protected boolean process(org.jsoup.parser.Token token) -
popStackToClose
protected void popStackToClose(org.jsoup.parser.Token.EndTag endTag) If the stack contains an element with this tag's name, pop up the stack to remove the first occurrence. If not found, skips.- Parameters:
-
endTag
- tag to close
-