Oracle® Database XML C API Reference 11g Release 2 (11.2) Part Number E10770-02 |
|
|
PDF · Mobi · ePub |
XPath methods process XPath related types and interfaces.
This chapter contains this section:
CAXML6204Table 13-1 summarizes the methods available through the XPath
interface.
CAXML6205Table 13-1 Summary of XPath Methods
Function | Summary |
---|---|
Create an XPath context. |
|
Destroy an XPath context. |
|
Evaluate XPath expression. |
|
Get boolean value of XPath object. |
|
Get fragment value of XPath object. |
|
Get node from nodeset type XPath object. |
|
Get number of nodes in nodeset type XPath object. |
|
Get number from XPath object. |
|
Get string from XPath object. |
|
Get XPath object type. |
|
Parse XPath expression. |
Create an XPath
context
CAXML6207Syntax
xpctx* XmlXPathCreateCtx( xmlctx *xsl, oratext *baseuri, xmlnode *ctxnode, ub4 ctxpos, ub4 ctxsize);
Parameter | In/Out | Description |
---|---|---|
xsl |
IN |
XSL stylesheet as xmldoc object |
baseuri |
IN |
base URI used by document, if any |
ctxnode |
IN |
current context position |
ctxpos |
IN |
current context size |
ctxsize |
IN |
current context node |
CAXML6208Returns
(xpctx *)
XPath context or NULL
on error
Destroy an XPath context.
CAXML6210Syntax
void XmlXPathDestroyCtx( xpctx *xslxpctx);
Parameter | In/Out | Description |
---|---|---|
xslxpctx |
IN |
XPath context object |
Evaluate XPath
expression.
CAXML6212Syntax
xpobj *XmlXPathEval( xpctx *xctx, xpexpr *exprtree, xmlerr *err);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XPath context |
exprtree |
IN |
parsed XPath expression tree |
err |
OUT |
error code |
CAXML6213Returns
(xpobj *)
result XPath object or NULL
on error
Get boolean value of XPath
object
CAXML6215Syntax
boolean XmlXPathGetObjectBoolean( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6216Returns
(boolean)
truth value
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNum(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Get boolean value of XPath
object
CAXML6218Syntax
xmlnode* XmlXPathGetObjectFragment( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6219Returns
(boolean)
truth value
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNum(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Get node from nodeset-type XPath object
CAXML6221Syntax
xmlnode *XmlXPathGetObjectNSetNode( xpobj *obj, ub4 i);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
i |
IN |
node index in nodeset |
CAXML6222Returns
(xmlnode *)
The object type or values.
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNum(), XmlXPathGetObjectString(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Get number of nodes in nodeset-type XPath
object
CAXML6224Syntax
ub4 XmlXPathGetObjectNSetNum( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6225Returns
(ub4)
number of nodes in nodeset
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectString(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Get number from XPath object
CAXML6227Syntax
double XmlXPathGetObjectNumber( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6228Returns
(double)
number
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNum(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectString(), XmlXPathGetObjectBoolean()Get string from XPath
object
CAXML6230Syntax
oratext *XmlXPathGetObjectString( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6231Returns
(oratext *)
string
See Also:
XmlXPathGetObjectType(), XmlXPathGetObjectNSetNum(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Get XPath
object type
CAXML6233Syntax
xmlxslobjtype XmlXPathGetObjectType( xpobj *obj);
Parameter | In/Out | Description |
---|---|---|
obj |
IN |
XPath object |
CAXML6234Returns
(xmlxslobjtype)
type-code for object
See Also:
XmlXPathGetObjectNSetNum(), XmlXPathGetObjectNSetNode(), XmlXPathGetObjectString(), XmlXPathGetObjectNumber(), XmlXPathGetObjectBoolean()Parse XPath
expression.
CAXML6236Syntax
xpexpr* XmlXPathParse( xpctx *xctx, oratext *expr, xmlerr * err);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XPath context object |
expr |
IN |
XPath expression |
err |
OUT |
error code |
CAXML6237Returns
(xpexpr *)
XPath
expression parse tree or NULL
on error