[All Packages] [This Package]
XPath | XPath constructor |
~XPath | Deletes the XPath object |
parsexpathexpr | Parses an XPath expression |
evalxpathexpr | Evaluates an already parsed XPath expression |
XPath (xmlctx *ctx, xmlnode *xslnode, xmlnode* xml_node, oratext* baseURI, size_t nctxels, xmlnode ** ctxnodes);
ctx (IN) - XSL context. Could be NULL. xslnode (IN) - The XSL node to be used for namespace expansion. Could be set to NULL. xmlnode (IN) - The context node. Set to NULL for parsing. baseURI (IN) - The base URI for parsing. nctxels (IN) - The number of nodes in the current node set. ctxnodes (IN) - The current node set.
An XPath object. This call never fails.
delete ();
xpexpr *parsexpathexpr (oratext *expr, sword *err);
expr (IN) - The expression in the form of a string. err (OUT) - The error code.
On success, returns the expression tree. On failure, returns NULL.
XPObject *evalxpathexpr (xpexpr *exprtree, sword *err);
exprtree (IN) - The expression in the form of a tree. err (OUT) - The error code.
On success, returns the result object. On failure, returns NULL.
The type of the result object is one of the following:XPOBJTYP_BOOL XPOBJTYP_NUM XPOBJTYP_STR XPOBJTYP_NSET XPOBJTYP_RTFRAG
The object type can be obtained using getxpobjtyp.