Class Document

java.lang.Object
jodd.lagarto.dom.Node
jodd.lagarto.dom.Document
All Implemented Interfaces:
Cloneable

public class Document extends Node
Document node is always a root node. Holds various DOM-related configuration and information.
  • Field Details

  • Constructor Details

    • Document

      public Document()
    • Document

      public Document(LagartoDomBuilderConfig config)
      Document constructor with all relevant flags.
  • Method Details

    • clone

      public Document clone()
      Specified by:
      clone in class Node
    • end

      protected void end()
      Notifies document that parsing is done.
    • visitNode

      protected void visitNode(NodeVisitor nodeVisitor)
      Description copied from class: Node
      Visits single node. Implementations just needs to call the correct visitor callback function.
      Specified by:
      visitNode in class Node
    • addError

      public void addError(String message)
      Add new error message to the errors list. If errors are not collected error, message is ignored.
    • getErrors

      public List<String> getErrors()
      Returns list of warnings and errors occurred during parsing. Returns null if parsing was successful; or if errors are not collected.
    • setAttribute

      public void setAttribute(String name, String value)
      Document node does not have attributes.
      Overrides:
      setAttribute in class Node
    • getElapsedTime

      public long getElapsedTime()
      Returns DOM building elapsed time.
    • getConfig

      public LagartoDomBuilderConfig getConfig()