Class DomBuilder

java.lang.Object
org.htmlcleaner.DomBuilder
All Implemented Interfaces:
XmlVisitor

public class DomBuilder extends Object implements XmlVisitor
  • Field Details

    • escapeXml

      protected boolean escapeXml
    • deserializeCdataEntities

      protected boolean deserializeCdataEntities
    • strictErrorChecking

      protected boolean strictErrorChecking
  • Constructor Details

    • DomBuilder

      public DomBuilder(CleanerProperties props, boolean escapeXml, boolean deserializeCdataEntities, boolean strictErrorChecking)
  • Method Details

    • getDocument

      public Document getDocument()
    • head

      public void head(HtmlNode node, int depth)
      Description copied from interface: XmlVisitor
      Callback for when a node is first visited.
      Specified by:
      head in interface XmlVisitor
      Parameters:
      node - the node being visited.
      depth - the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.
    • deserializeCdataEntities

      protected String deserializeCdataEntities(String input)
    • tail

      public void tail(HtmlNode node, int depth)
      Description copied from interface: XmlVisitor
      Callback for when a node is last visited, after all of its descendants have been visited.
      Specified by:
      tail in interface XmlVisitor
      Parameters:
      node - the node being visited.
      depth - the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.
    • createDocument

      protected Document createDocument(TagNode rootNode) throws ParserConfigurationException
      Throws:
      ParserConfigurationException