Class 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
    • Constructor Detail

      • XmlTreeBuilder

        public XmlTreeBuilder()
    • Method Detail

      • initialiseParse

        protected void initialiseParse​(Reader input,
                                       String baseUri,
                                       Parser parser)
      • process

        protected boolean process​(org.jsoup.parser.Token token)
      • runParser

        protected void runParser()
      • processStartTag

        protected boolean processStartTag​(String name)
      • processStartTag

        public boolean processStartTag​(String name,
                                       Attributes attrs)
      • processEndTag

        protected boolean processEndTag​(String name)
      • currentElement

        protected Element currentElement()
      • error

        protected void error​(String msg)
        If the parser is tracking errors, and an error at the current position.
        Parameters:
        msg - error message