Class Document

  • All Implemented Interfaces:
    java.lang.Cloneable

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

      • elapsedTime

        protected long elapsedTime
      • errors

        protected java.util.List<java.lang.String> errors
    • Constructor Detail

      • Document

        public Document()
    • Method Detail

      • 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​(java.lang.String message)
        Add new error message to the errors list. If errors are not collected error, message is ignored.
      • getErrors

        public java.util.List<java.lang.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​(java.lang.String name,
                                 java.lang.String value)
        Document node does not have attributes.
        Overrides:
        setAttribute in class Node
      • getElapsedTime

        public long getElapsedTime()
        Returns DOM building elapsed time.