Example usage for Java org.apache.commons.jxpath JXPathContext fields, constructors, methods, implement or subclass
The text is from its open source code.
CompiledExpression | compile(String xpath) Compiles the supplied XPath and returns an internal representation of the path that can then be evaluated. |
Pointer | createPath(String xpath) Creates missing elements of the path by invoking an AbstractFactory , which should first be installed on the context by calling #setFactory . |
Pointer | createPathAndSetValue(String xpath, Object value) The same as setValue, except it creates intermediate elements of the path by invoking an AbstractFactory , which should first be installed on the context by calling #setFactory . |
Object | getContextBean() Returns the JavaBean associated with this context. |
Pointer | getContextPointer() Returns a Pointer for the context bean. |
AbstractFactory | getFactory() Returns the AbstractFactory installed on this context. |
Functions | getFunctions() Returns the set of functions installed on the context. |
Pointer | getNamespaceContextPointer() Returns the namespace context pointer set with #setNamespaceContextPointer(Pointer) setNamespaceContextPointer() or, if none has been specified, the context pointer otherwise. |
String | getNamespaceURI(String prefix) Given a prefix, returns a registered namespace URI. |
JXPathContext | getParentContext() Returns the parent context of this context or null. |
Pointer | getPointer(String xpath) Traverses the xpath and returns a Pointer. |
String | getPrefix(String namespaceURI) Get the prefix associated with the specifed namespace URI. |
JXPathContext | getRelativeContext(Pointer pointer) Returns a JXPathContext that is relative to the current JXPathContext. |
Object | getValue(String xpath) Evaluates the xpath and returns the resulting object. |
Object | getValue(String xpath, Class requiredType) Evaluates the xpath, converts the result to the specified class and returns the resulting object. |
Variables | getVariables() Returns the variable pool associated with the context. |
boolean | isLenient() Learn whether this JXPathContext is lenient. |
Iterator | iterate(String xpath) Traverses the xpath and returns an Iterator of all results found for the path. |
Iterator | iteratePointers(String xpath) Traverses the xpath and returns an Iterator of Pointers. |
JXPathContext | newContext(Object contextBean) Creates a new JXPathContext with the specified object as the root node. |
JXPathContext | newContext(JXPathContext parentContext, Object contextBean) Creates a new JXPathContext with the specified bean as the root node and the specified parent context. |
void | registerNamespace(String prefix, String namespaceURI) Registers a namespace prefix. |
void | removeAll(String xpath) Removes all elements of the object graph described by the xpath. |
void | removePath(String xpath) Removes the element of the object graph described by the xpath. |
List | selectNodes(String xpath) Finds all nodes that match the specified XPath. |
Object | selectSingleNode(String xpath) Finds the first object that matches the specified XPath. |
void | setFactory(AbstractFactory factory) Install an abstract factory that should be used by the createPath() and createPathAndSetValue() methods. |
void | setFunctions(Functions functions) Install a library of extension functions. |
void | setIdentityManager(IdentityManager idManager) Install an identity manager that will be used by the context to look up a node by its ID. |
void | setLenient(boolean lenient) If the context is in the lenient mode, then getValue() returns null for inexistent paths. |
void | setNamespaceContextPointer(Pointer namespaceContextPointer) Namespace prefixes can be defined implicitly by specifying a pointer to a context where the namespaces are defined. |
void | setValue(String xpath, Object value) Modifies the value of the property described by the supplied xpath. |
void | setVariables(Variables vars) Installs a custom implementation of the Variables interface. |