Java Code Examples for org.apache.commons.jxpath.JXPathContext#registerNamespace()
The following examples show how to use
org.apache.commons.jxpath.JXPathContext#registerNamespace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExternalXMLNamespaceTest.java From commons-jxpath with Apache License 2.0 | 5 votes |
protected JXPathContext createContext(String model) { JXPathContext context = JXPathContext .newContext(createDocumentContainer(model)); context.registerNamespace("A", "foo"); context.registerNamespace("B", "bar"); return context; }
Example 2
Source File: XMLModelTestCase.java From commons-jxpath with Apache License 2.0 | 5 votes |
protected JXPathContext createContext() { JXPathContext context = JXPathContext.newContext(createDocumentContainer()); context.setFactory(getAbstractFactory()); context.registerNamespace("product", "productNS"); return context; }
Example 3
Source File: AliasedNamespaceIterationTest.java From commons-jxpath with Apache License 2.0 | 4 votes |
protected JXPathContext createContext(String model) { JXPathContext context = JXPathContext.newContext(createDocumentContainer(model)); context.registerNamespace("a", "ns"); return context; }