public interface DOMVisitor
init();
walkRecursively(documentElement);
finish();
where:
void walkRecursively(DOMNode node){
startElement(node);
visitNode(node); //per type node
for (final DOMNode child : node.getChildNodes())}
walkRecursively(child);
endElement(node);
}
Modifier and Type | Method and Description |
---|---|
void |
endElement(DOMNode node)
Called after visiting allElements node's descendant
|
boolean |
filterOut(DOMNode node)
Returns true is the current node must be skipped during the visit, false otherwise
|
void |
finish()
Called at the very end of the visit
|
void |
init()
Initialize the visitor.
|
void |
startElement(DOMNode node)
Called before visiting the node's children and descendants.
|
void |
visitComment(DOMNode node)
Called in case of the current
DOMNode is of type DOMNode.Type.COMMENT |
void |
visitProcessingInstruction(DOMNode node)
Called in case of the current
DOMNode is of type DOMNode.Type.PROCESSING_INSTRUCTION |
void |
visitText(DOMNode node)
Called in case of the current
DOMNode is of type DOMNode.Type.TEXT |
void init()
void startElement(DOMNode node)
node
- the node under visitvoid endElement(DOMNode node)
node
- the node under visitvoid finish()
void visitComment(DOMNode node)
DOMNode
is of type DOMNode.Type.COMMENT
node
- the node under visitvoid visitText(DOMNode node)
DOMNode
is of type DOMNode.Type.TEXT
node
- the node under visitvoid visitProcessingInstruction(DOMNode node)
DOMNode
is of type DOMNode.Type.PROCESSING_INSTRUCTION
node
- the node under visitboolean filterOut(DOMNode node)
node
- the node under visitCopyright © 2020 OXPath Team. All rights reserved.