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 Details

    • parser

      protected Parser parser
  • Constructor Details

  • Method Details

    • initialiseParse

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

    • process

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

      @Deprecated protected void insertNode(Node node)
      Deprecated.
      unused and will be removed.
    • insertNode

      @Deprecated protected void insertNode(Node node, org.jsoup.parser.Token token)
      Deprecated.
      unused and will be removed.
    • 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