Package org.xmlunit.diff
Class RecursiveXPathBuilder
- java.lang.Object
-
- org.xmlunit.diff.RecursiveXPathBuilder
-
- All Implemented Interfaces:
Mapper<Node,XPathContext>
public class RecursiveXPathBuilder extends Object implements Mapper<Node,XPathContext>
Finds the XPathContext of a Node by recursively building up the XPathContext.
-
-
Constructor Summary
Constructors Constructor Description RecursiveXPathBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathContextapply(Node n)Performs the mapping operation.voidsetNamespaceContext(Map<String,String> prefix2uri)Establish a namespace context that will be used in for the XPath.
-
-
-
Method Detail
-
setNamespaceContext
public void setNamespaceContext(Map<String,String> prefix2uri)
Establish a namespace context that will be used in for the XPath.Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.
- Parameters:
prefix2uri- maps from prefix to namespace URI.
-
apply
public XPathContext apply(Node n)
Description copied from interface:MapperPerforms the mapping operation.- Specified by:
applyin interfaceMapper<Node,XPathContext>- Parameters:
n- the input to the mapping function- Returns:
- the mapping result
-
-