class ChildNodeXPathContextProvider extends java.lang.Object implements Mapper<org.w3c.dom.Node,XPathContext>
Node to XPathContext by assuming all nodes
passed in are child nodes of the same parent node who's
XPathContext is provided as argument to the constructor.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<org.w3c.dom.Node,java.lang.Integer> |
childIndex |
private XPathContext |
xpathContext |
| Constructor and Description |
|---|
ChildNodeXPathContextProvider(XPathContext parentContext,
java.lang.Iterable<org.w3c.dom.Node> children)
Creates an instance of ChildNodeXPathContextProvider.
|
| Modifier and Type | Method and Description |
|---|---|
XPathContext |
apply(org.w3c.dom.Node n) |
private final XPathContext xpathContext
private final java.util.Map<org.w3c.dom.Node,java.lang.Integer> childIndex
ChildNodeXPathContextProvider(XPathContext parentContext, java.lang.Iterable<org.w3c.dom.Node> children)
parentContext - context of the parent of all Nodes ever
expected to be passed in as arguments to apply(org.w3c.dom.Node). This XPathContext must be "positioned
at" the parent element and already know about all its children.children - all child nodes of the parent in the same order
they are known to the XPathContext.public XPathContext apply(org.w3c.dom.Node n)
apply in interface Mapper<org.w3c.dom.Node,XPathContext>