Package XPointer
contains APIs for three interfaces.
This chapter contains these sections:
Table 14-1 summarizes the methods available through the XPointer
interface.
Table 14-1 Summary of XPointer Methods; Package XPointer
Function | Summary |
---|---|
Evaluates xpointer string. |
Parses and evaluates xpointer string and calculates locations in the document.
xmlxptrlocset* XmlXPointerEval( xmldocnode* doc, oratext* xptrstr);
Parameter | In/Out | Description |
---|---|---|
doc |
IN |
document node of the corresponding DOM tree |
xptrstr |
IN |
xpointer string |
(xmlxptrlocset *)
calculated ___location set
Table 14-2 summarizes the methods available through the XPtrLoc
interface.
Table 14-2 Summary of XPtrLoc Methods; Package XPointer
Function | Summary |
---|---|
Returns Xml node from |
|
Returns Xml point from |
|
Returns Xml range from |
|
Returns type of |
|
Returns string for a ___location. |
Returns node from ___location
xmlnode* XmlXPtrLocGetNode( xmlxptrloc* loc);
Parameter | In/Out | Description |
---|---|---|
loc |
IN |
___location |
(xmlnode *)
Node
from ___location
Returns point from ___location
xmlpoint* XmlXPtrLocGetPoint( xmlxptrloc* loc);
Parameter | In/Out | Description |
---|---|---|
loc |
IN |
___location |
(xmlpoint *)
Point from ___location
Returns range from ___location.
xmlrange* XmlXPtrLocGetRange( xmlxptrloc* loc);
Parameter | In/Out | Description |
---|---|---|
loc |
IN |
___location |
(xmlrange *)
Range from ___location
Returns type of ___location
xmlxptrloctype XmlXPtrLocGetType( xmlxptrloc* loc);
Parameter | In/Out | Description |
---|---|---|
loc |
IN |
___location |
(xmlxptrloctype)
Type of ___location
Returns string for a ___location:
- node name: name of the container node
- names of container nodes: "not a ___location" otherwise
oratext* XmlXPtrLocToString( xmlxptrloc* loc);
Parameter | In/Out | Description |
---|---|---|
loc |
IN |
___location |
(oratext *)
string
Table 14-3 summarizes the methods available through the XPtrLocSet
interface.
Table 14-3 Summary of XPtrLocSet Methods; Package XPointer
Function | Summary |
---|---|
Free a ___location set |
|
Returns ___location with |
|
Returns length of |
It is user's responsibility to call this function on every ___location set returned by XPointer
or XPtrLocSet
interfaces
void XmlXPtrLocSetFree( xmlxptrlocset* locset);
Parameter | In/Out | Description |
---|---|---|
locset |
IN |
___location set |
Returns ___location with idx position in the ___location set. First position is 1
.
xmlxptrloc* XmlXPtrLocSetGetItem( xmlxptrlocset* locset, ub4 idx);
Parameter | In/Out | Description |
---|---|---|
locset |
IN |
___location set |
idx |
IN |
___location index |
(xmlxptrloc *)
___location with the position idx
Returns the number of locations in the ___location set
ub4 XmlXPtrLocSetGetLength( xmlxptrlocset* locset);
Parameter | In/Out | Description |
---|---|---|
locset |
IN |
___location set |
(ub4)
number of nodes in locset