public final class XPointerXPointer extends Object implements SimpleXPointer
XPointerScheme
Modifier and Type | Field and Description |
---|---|
NodeSetExpr |
nodeSetExpr
The XPath expression which is used to implement the node search.
|
String |
stringForm
The string form of
nodeSetExpr . |
Constructor and Description |
---|
XPointerXPointer(NodeSetExpr nodeSetExpr)
Equivalent to
this(nodeSetExpr, null) . |
XPointerXPointer(NodeSetExpr nodeSetExpr,
String stringForm)
Constructs an xpointer having specified XPath expression
in compiled and in string forms.
|
Modifier and Type | Method and Description |
---|---|
Node[] |
findNodes(Document doc,
Object context)
Searches specified document and returns the range of nodes selected
by this xpointer.
|
String |
toString()
Returns the string representation of this xpointer.
|
public final NodeSetExpr nodeSetExpr
public final String stringForm
nodeSetExpr
.
May be null
(if it's unavailable).public XPointerXPointer(NodeSetExpr nodeSetExpr)
this(nodeSetExpr, null)
.public XPointerXPointer(NodeSetExpr nodeSetExpr, String stringForm)
nodeSetExpr
,
stringForm
public String toString()
stringForm
is not null
.public Node[] findNodes(Document doc, Object context) throws XPointerException
SimpleXPointer
findNodes
in interface SimpleXPointer
doc
- document to be searchedcontext
- a context object (for example, cached data)
which is specific to the scheme of this xpointer.
May be null
An implementation cannot count on a context to be available.
null
XPointerException
- if an error occurs during the search or
if no nodes selected by this xpointer are found
Note that an implementation may choose to return null
rather than raise an exception.