org.apache.commons.jxpath.ri.model.dom
Class NamespacePointer
- Cloneable, Comparable, Pointer, Serializable
public class NamespacePointer
Represents a namespace node.
$Revision: 1.13 $ $Date: 2004/04/01 02:55:32 $
asPath, attributeIterator, childIterator, clone, compareChildNodePointers, compareTo, createAttribute, createChild, createChild, createPath, createPath, getBaseValue, getDefaultNamespaceURI, getImmediateNode, getImmediateParentPointer, getImmediateValuePointer, getIndex, getLength, getLocale, getName, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, isActual, isAttribute, isCollection, isContainer, isDefaultNamespace, isLanguage, isLeaf, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, remove, setAttribute, setIndex, setNamespaceResolver, setValue, testNode, toString |
NamespacePointer
public NamespacePointer(NodePointer parent,
String prefix)
NamespacePointer
public NamespacePointer(NodePointer parent,
String prefix,
String namespaceURI)
asPath
public String asPath()
Returns a string that is a proper "canonical" XPath that corresponds to
this pointer. Consider this example:
Pointer ptr = ctx.getPointer("//employees[firstName = 'John']")
The value of
ptr.asPath() will look something like
"/departments[2]/employees[3]", so, basically, it represents
the concrete location(s) of the result of a search performed by JXPath.
If an object in the pointer's path is a Dynamic Property object (like a
Map), the asPath method generates an XPath that looks like this:
"
/departments[@name = 'HR']/employees[3]".
- asPath in interface Pointer
- asPath in interface NodePointer
equals
public boolean equals(Object object)
hashCode
public int hashCode()