Class XpathNodeTracker

    • Constructor Detail

      • XpathNodeTracker

        public XpathNodeTracker()
        Simple constructor
    • Method Detail

      • reset

        public void reset()
        Clear state data. Call if required to reuse an existing instance.
      • indent

        public void indent()
        Call before examining child nodes one level of indentation into DOM
      • clearTrackedAttribute

        public void clearTrackedAttribute()
        Call after processing attributes of an element and turining to compare the child nodes.
      • outdent

        public void outdent()
        Call after examining child nodes, ie before returning back one level of indentation from DOM
      • visited

        public void visited​(org.w3c.dom.Node node)
        Call when visiting a node whose xpath location needs tracking
        Parameters:
        node - the Node being visited
      • visitedNode

        protected void visitedNode​(org.w3c.dom.Node visited,
                                   java.lang.String value)
      • visitedAttribute

        protected void visitedAttribute​(java.lang.String visited)
      • preloadNodeList

        public void preloadNodeList​(org.w3c.dom.NodeList nodeList)
        Preload the items in a NodeList by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison
        Parameters:
        nodeList - the items to preload
      • preloadChildList

        public void preloadChildList​(java.util.List nodeList)
        Preload the items in a List by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison
        Parameters:
        nodeList - the items to preload
      • toXpathString

        public java.lang.String toXpathString()
        Returns:
        the last visited node as an xpath-location String