public class XpathNodeTracker extends java.lang.Object implements XMLConstants
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, NULL_NS_URI, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_TYPE_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_ATTRIBUTE_URI, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
Constructor and Description |
---|
XpathNodeTracker()
Simple constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clearTrackedAttribute()
Call after processing attributes of an element and turining to
compare the child nodes.
|
void |
indent()
Call before examining child nodes one level of indentation into DOM
|
void |
outdent()
Call after examining child nodes, ie before returning back one level of indentation from DOM
|
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
|
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
|
void |
reset()
Clear state data.
|
java.lang.String |
toXpathString() |
void |
visited(org.w3c.dom.Node node)
Call when visiting a node whose xpath location needs tracking
|
protected void |
visitedAttribute(java.lang.String visited) |
protected void |
visitedNode(org.w3c.dom.Node visited,
java.lang.String value) |
public void reset()
public void indent()
public void clearTrackedAttribute()
public void outdent()
public void visited(org.w3c.dom.Node node)
node
- the Node being visitedprotected void visitedNode(org.w3c.dom.Node visited, java.lang.String value)
protected void visitedAttribute(java.lang.String visited)
public void preloadNodeList(org.w3c.dom.NodeList nodeList)
nodeList
- the items to preloadpublic void preloadChildList(java.util.List nodeList)
nodeList
- the items to preloadpublic java.lang.String toXpathString()