xpath

Name

xpath —

Synopsis



#define     XPATH_UNDEFINED
#define     XPATH_NODESET
#define     XPATH_BOOLEAN
#define     XPATH_NUMBER
#define     XPATH_STRING
void        (*xmlXPathFunction)             (xmlXPathParserContextPtr ctxt,
                                             int nargs);
xmlXPathContextPtr xmlXPathNewContext       (xmlDocPtr doc,
                                             void *variables,
                                             void *functions);
void        xmlXPathFreeContext             (xmlXPathContextPtr ctxt);
xmlXPathObjectPtr xmlXPathEval              (const CHAR *str,
                                             xmlXPathContextPtr ctxt);
void        xmlXPathFreeObject              (xmlXPathObjectPtr obj);
xmlXPathObjectPtr xmlXPathEvalExpression    (const CHAR *str,
                                             xmlXPathContextPtr ctxt);

Description

Details

XPATH_UNDEFINED

#define XPATH_UNDEFINED	0


XPATH_NODESET

#define XPATH_NODESET	1


XPATH_BOOLEAN

#define XPATH_BOOLEAN	2


XPATH_NUMBER

#define XPATH_NUMBER	3


XPATH_STRING

#define XPATH_STRING	4


xmlXPathFunction ()

void        (*xmlXPathFunction)             (xmlXPathParserContextPtr ctxt,
                                             int nargs);

ctxt : 
nargs : 


xmlXPathNewContext ()

xmlXPathContextPtr xmlXPathNewContext       (xmlDocPtr doc,
                                             void *variables,
                                             void *functions);

Create a new xmlXPathContext

doc : the XML document
variables : the variable list
functions : the function list
Returns :the xmlXPathContext just allocated.


xmlXPathFreeContext ()

void        xmlXPathFreeContext             (xmlXPathContextPtr ctxt);

Free up an xmlXPathContext

ctxt : the context to free


xmlXPathEval ()

xmlXPathObjectPtr xmlXPathEval              (const CHAR *str,
                                             xmlXPathContextPtr ctxt);

Evaluate the XPath Location Path in the given context.

str : the XPath expression
ctxt : the XPath context
Returns :the xmlXPathObjectPtr resulting from the eveluation or NULL. the caller has to free the object.


xmlXPathFreeObject ()

void        xmlXPathFreeObject              (xmlXPathObjectPtr obj);

Free up an xmlXPathObjectPtr object.

obj : the object to free


xmlXPathEvalExpression ()

xmlXPathObjectPtr xmlXPathEvalExpression    (const CHAR *str,
                                             xmlXPathContextPtr ctxt);

Evaluate the XPath expression in the given context.

str : the XPath expression
ctxt : the XPath context
Returns :the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.