Annotation of embedaddon/libxml2/doc/devhelp/libxml2-xpath.html, revision 1.1.1.1
1.1 misho 1: <?xml version="1.0" encoding="UTF-8"?>
2: <html>
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5: <title>xpath: XML Path Language implementation</title>
6: <meta name="generator" content="Libxml2 devhelp stylesheet"/>
7: <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
8: <link rel="up" href="general.html" title="API"/>
9: <link rel="stylesheet" href="style.css" type="text/css"/>
10: <link rel="chapter" href="general.html" title="API"/>
11: </head>
12: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13: <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
14: <tr valign="middle">
15: <td>
16: <a accesskey="p" href="libxml2-xmlwriter.html">
17: <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
18: </a>
19: </td>
20: <td>
21: <a accesskey="u" href="general.html">
22: <img src="up.png" width="24" height="24" border="0" alt="Up"/>
23: </a>
24: </td>
25: <td>
26: <a accesskey="h" href="index.html">
27: <img src="home.png" width="24" height="24" border="0" alt="Home"/>
28: </a>
29: </td>
30: <td>
31: <a accesskey="n" href="libxml2-xpathInternals.html">
32: <img src="right.png" width="24" height="24" border="0" alt="Next"/>
33: </a>
34: </td>
35: <th width="100%" align="center">libxml2 Reference Manual</th>
36: </tr>
37: </table>
38: <h2>
39: <span class="refentrytitle">xpath</span>
40: </h2>
41: <p>xpath - XML Path Language implementation</p>
42: <p>API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer</p>
43: <p>Author(s): Daniel Veillard </p>
44: <div class="refsynopsisdiv">
45: <h2>Synopsis</h2>
46: <pre class="synopsis">#define <a href="#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a>(ns);
47: #define <a href="#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a>;
48: #define <a href="#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a>;
49: #define <a href="#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a>(ns, index);
50: #define <a href="#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a>(ns);
51: typedef enum <a href="#xmlXPathObjectType">xmlXPathObjectType</a>;
52: typedef <a href="libxml2-xpath.html#xmlXPathVariable">xmlXPathVariable</a> * <a href="#xmlXPathVariablePtr">xmlXPathVariablePtr</a>;
53: typedef struct _xmlXPathContext <a href="#xmlXPathContext">xmlXPathContext</a>;
54: typedef enum <a href="#xmlXPathError">xmlXPathError</a>;
55: typedef struct _xmlXPathFunct <a href="#xmlXPathFunct">xmlXPathFunct</a>;
56: typedef <a href="libxml2-xpath.html#xmlXPathType">xmlXPathType</a> * <a href="#xmlXPathTypePtr">xmlXPathTypePtr</a>;
57: typedef struct _xmlXPathType <a href="#xmlXPathType">xmlXPathType</a>;
58: typedef <a href="libxml2-xpath.html#xmlNodeSet">xmlNodeSet</a> * <a href="#xmlNodeSetPtr">xmlNodeSetPtr</a>;
59: typedef <a href="libxml2-xpath.html#xmlXPathFunct">xmlXPathFunct</a> * <a href="#xmlXPathFuncPtr">xmlXPathFuncPtr</a>;
60: typedef <a href="libxml2-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a> * <a href="#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a>;
61: typedef struct _xmlXPathObject <a href="#xmlXPathObject">xmlXPathObject</a>;
62: typedef struct _xmlXPathCompExpr <a href="#xmlXPathCompExpr">xmlXPathCompExpr</a>;
63: typedef <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> * <a href="#xmlXPathContextPtr">xmlXPathContextPtr</a>;
64: typedef <a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> * <a href="#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a>;
65: typedef struct _xmlNodeSet <a href="#xmlNodeSet">xmlNodeSet</a>;
66: typedef struct _xmlXPathVariable <a href="#xmlXPathVariable">xmlXPathVariable</a>;
67: typedef <a href="libxml2-xpath.html#xmlXPathObject">xmlXPathObject</a> * <a href="#xmlXPathObjectPtr">xmlXPathObjectPtr</a>;
68: typedef struct _xmlXPathAxis <a href="#xmlXPathAxis">xmlXPathAxis</a>;
69: typedef <a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * <a href="#xmlXPathAxisPtr">xmlXPathAxisPtr</a>;
70: typedef struct _xmlXPathParserContext <a href="#xmlXPathParserContext">xmlXPathParserContext</a>;
71: int <a href="#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
72: typedef <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
73: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
74: int <a href="#xmlXPathIsNaN">xmlXPathIsNaN</a> (double val);
75: int <a href="#xmlXPathContextSetCache">xmlXPathContextSetCache</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options);
76: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertString">xmlXPathConvertString</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
77: int <a href="#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
78: int <a href="#xmlXPathIsInf">xmlXPathIsInf</a> (double val);
79: long <a href="#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
80: <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
81: double <a href="#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a> (int val);
82: double <a href="#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
83: double <a href="#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
84: typedef <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathAxisFunc">xmlXPathAxisFunc</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur);
85: double <a href="#xmlXPathCastToNumber">xmlXPathCastToNumber</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
86: int <a href="#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
87: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a> (double val);
88: typedef <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
89: void <a href="#xmlXPathFreeObject">xmlXPathFreeObject</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);
90: int <a href="#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res);
91: void <a href="#xmlXPathFreeContext">xmlXPathFreeContext</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
92: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathObjectCopy">xmlXPathObjectCopy</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
93: void <a href="#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);
94: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEval">xmlXPathEval</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
95: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
96: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathCompiledEval">xmlXPathCompiledEval</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
97: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEvalExpression">xmlXPathEvalExpression</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
98: void <a href="#xmlXPathInit">xmlXPathInit</a> (void);
99: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
100: typedef int <a href="#xmlXPathConvertFunc">xmlXPathConvertFunc</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type);
101: typedef void <a href="#xmlXPathFunction">xmlXPathFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
102: int <a href="#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
103: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastToString">xmlXPathCastToString</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
104: <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
105: typedef void <a href="#xmlXPathEvalFunc">xmlXPathEvalFunc</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
106: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a> (int val);
107: int <a href="#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a> (double val);
108: void <a href="#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj);
109: void <a href="#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp);
110: <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPathNewContext">xmlXPathNewContext</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
111: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertNumber">xmlXPathConvertNumber</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
112: <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCompile">xmlXPathCompile</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
113: double <a href="#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
114: int <a href="#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
115: </pre>
116: </div>
117: <div class="refsect1" lang="en">
118: <h2>Description</h2>
119: </div>
120: <div class="refsect1" lang="en">
121: <h2>Details</h2>
122: <div class="refsect2" lang="en">
123: <div class="refsect2" lang="en"><h3><a name="XML_XPATH_CHECKNS">Macro </a>XML_XPATH_CHECKNS</h3><pre class="programlisting">#define <a href="#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a>;
124: </pre><p>check namespaces at compilation</p>
125: </div>
126: <hr/>
127: <div class="refsect2" lang="en"><h3><a name="XML_XPATH_NOVAR">Macro </a>XML_XPATH_NOVAR</h3><pre class="programlisting">#define <a href="#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a>;
128: </pre><p>forbid variables in expression</p>
129: </div>
130: <hr/>
131: <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetGetLength">Macro </a>xmlXPathNodeSetGetLength</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a>(ns);
132: </pre><p>Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
133: </div>
134: <hr/>
135: <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetIsEmpty">Macro </a>xmlXPathNodeSetIsEmpty</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a>(ns);
136: </pre><p>Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
137: </div>
138: <hr/>
139: <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetItem">Macro </a>xmlXPathNodeSetItem</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a>(ns, index);
140: </pre><p>Implements a functionality similar to the DOM NodeList.item(). Returns the <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> at the given @index in @ns or NULL if @index is out of range (0 to length-1)</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>index</tt></i>:</span></td><td>index of a node in the set</td></tr></tbody></table></div>
141: </div>
142: <hr/>
143: <div class="refsect2" lang="en"><h3><a name="xmlNodeSet">Structure </a>xmlNodeSet</h3><pre class="programlisting">struct _xmlNodeSet {
144: int nodeNr : number of nodes in the set
145: int nodeMax : size of the array as allocated
146: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes in no particular order @@ with_ns to check wether name
147: } xmlNodeSet;
148: </pre><p/>
149: </div>
150: <hr/>
151: <div class="refsect2" lang="en"><h3><a name="xmlNodeSetPtr">Typedef </a>xmlNodeSetPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSet">xmlNodeSet</a> * xmlNodeSetPtr;
152: </pre><p/>
153: </div>
154: <hr/>
155: <div class="refsect2" lang="en"><h3><a name="xmlXPathAxis">Structure </a>xmlXPathAxis</h3><pre class="programlisting">struct _xmlXPathAxis {
156: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the axis name
157: <a href="libxml2-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a> func : the search function
158: } xmlXPathAxis;
159: </pre><p/>
160: </div>
161: <hr/>
162: <div class="refsect2" lang="en"><h3><a name="xmlXPathAxisPtr">Typedef </a>xmlXPathAxisPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * xmlXPathAxisPtr;
163: </pre><p/>
164: </div>
165: <hr/>
166: <div class="refsect2" lang="en"><h3><a name="xmlXPathCompExpr">Structure </a>xmlXPathCompExpr</h3><pre class="programlisting">struct _xmlXPathCompExpr {
167: The content of this structure is not made public by the API.
168: } xmlXPathCompExpr;
169: </pre><p/>
170: </div>
171: <hr/>
172: <div class="refsect2" lang="en"><h3><a name="xmlXPathCompExprPtr">Typedef </a>xmlXPathCompExprPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a> * xmlXPathCompExprPtr;
173: </pre><p/>
174: </div>
175: <hr/>
176: <div class="refsect2" lang="en"><h3><a name="xmlXPathContext">Structure </a>xmlXPathContext</h3><pre class="programlisting">struct _xmlXPathContext {
177: <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc : The current document
178: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : The current node
179: int nb_variables_unused : unused (hash table)
180: int max_variables_unused : unused (hash table)
181: <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> varHash : Hash table of defined variables
182: int nb_types : number of defined types
183: int max_types : max number of types
184: <a href="libxml2-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a> types : Array of defined types
185: int nb_funcs_unused : unused (hash table)
186: int max_funcs_unused : unused (hash table)
187: <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> funcHash : Hash table of defined funcs
188: int nb_axis : number of defined axis
189: int max_axis : max number of axis
190: <a href="libxml2-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a> axis : Array of defined axis the namespace nodes of the context node
191: <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * namespaces : Array of namespaces
192: int nsNr : number of namespace in scope
193: void * user : function to free extra variables
194: int contextSize : the context size
195: int proximityPosition : the proximity position extra stuff for XPointer
196: int xptr : is this an XPointer context?
197: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> here : for here()
198: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> origin : for origin() the set of namespace declarations in scope for the expre
199: <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> nsHash : The namespaces hash table
200: <a href="libxml2-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> varLookupFunc : variable lookup func
201: void * varLookupData : variable lookup data Possibility to link in an extra item
202: void * extra : needed for XSLT The function name and URI when calling a function
203: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * function
204: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * functionURI : function lookup function and data
205: <a href="libxml2-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> funcLookupFunc : function lookup func
206: void * funcLookupData : function lookup data temporary namespace lists kept for walking the n
207: <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * tmpNsList : Array of namespaces
208: int tmpNsNr : number of namespaces in scope error reporting mechanism
209: void * userData : user specific data block
210: <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> error : the callback in case of errors
211: <a href="libxml2-xmlerror.html#xmlError">xmlError</a> lastError : the last error
212: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> debugNode : the source node XSLT dictionary
213: <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionary if any
214: int flags : flags to control compilation Cache for reusal of XPath objects
215: void * cache
216: } xmlXPathContext;
217: </pre><p/>
218: </div>
219: <hr/>
220: <div class="refsect2" lang="en"><h3><a name="xmlXPathContextPtr">Typedef </a>xmlXPathContextPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> * xmlXPathContextPtr;
221: </pre><p/>
222: </div>
223: <hr/>
224: <div class="refsect2" lang="en"><h3><a name="xmlXPathError">Enum </a>xmlXPathError</h3><pre class="programlisting">enum <a href="#xmlXPathError">xmlXPathError</a> {
225: <a name="XPATH_EXPRESSION_OK">XPATH_EXPRESSION_OK</a> = 0
226: <a name="XPATH_NUMBER_ERROR">XPATH_NUMBER_ERROR</a> = 1
227: <a name="XPATH_UNFINISHED_LITERAL_ERROR">XPATH_UNFINISHED_LITERAL_ERROR</a> = 2
228: <a name="XPATH_START_LITERAL_ERROR">XPATH_START_LITERAL_ERROR</a> = 3
229: <a name="XPATH_VARIABLE_REF_ERROR">XPATH_VARIABLE_REF_ERROR</a> = 4
230: <a name="XPATH_UNDEF_VARIABLE_ERROR">XPATH_UNDEF_VARIABLE_ERROR</a> = 5
231: <a name="XPATH_INVALID_PREDICATE_ERROR">XPATH_INVALID_PREDICATE_ERROR</a> = 6
232: <a name="XPATH_EXPR_ERROR">XPATH_EXPR_ERROR</a> = 7
233: <a name="XPATH_UNCLOSED_ERROR">XPATH_UNCLOSED_ERROR</a> = 8
234: <a name="XPATH_UNKNOWN_FUNC_ERROR">XPATH_UNKNOWN_FUNC_ERROR</a> = 9
235: <a name="XPATH_INVALID_OPERAND">XPATH_INVALID_OPERAND</a> = 10
236: <a name="XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a> = 11
237: <a name="XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a> = 12
238: <a name="XPATH_INVALID_CTXT_SIZE">XPATH_INVALID_CTXT_SIZE</a> = 13
239: <a name="XPATH_INVALID_CTXT_POSITION">XPATH_INVALID_CTXT_POSITION</a> = 14
240: <a name="XPATH_MEMORY_ERROR">XPATH_MEMORY_ERROR</a> = 15
241: <a name="XPTR_SYNTAX_ERROR">XPTR_SYNTAX_ERROR</a> = 16
242: <a name="XPTR_RESOURCE_ERROR">XPTR_RESOURCE_ERROR</a> = 17
243: <a name="XPTR_SUB_RESOURCE_ERROR">XPTR_SUB_RESOURCE_ERROR</a> = 18
244: <a name="XPATH_UNDEF_PREFIX_ERROR">XPATH_UNDEF_PREFIX_ERROR</a> = 19
245: <a name="XPATH_ENCODING_ERROR">XPATH_ENCODING_ERROR</a> = 20
246: <a name="XPATH_INVALID_CHAR_ERROR">XPATH_INVALID_CHAR_ERROR</a> = 21
247: <a name="XPATH_INVALID_CTXT">XPATH_INVALID_CTXT</a> = 22
248: };
249: </pre><p/>
250: </div>
251: <hr/>
252: <div class="refsect2" lang="en"><h3><a name="xmlXPathFuncPtr">Typedef </a>xmlXPathFuncPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunct">xmlXPathFunct</a> * xmlXPathFuncPtr;
253: </pre><p/>
254: </div>
255: <hr/>
256: <div class="refsect2" lang="en"><h3><a name="xmlXPathFunct">Structure </a>xmlXPathFunct</h3><pre class="programlisting">struct _xmlXPathFunct {
257: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the function name
258: <a href="libxml2-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a> func : the evaluation function
259: } xmlXPathFunct;
260: </pre><p/>
261: </div>
262: <hr/>
263: <div class="refsect2" lang="en"><h3><a name="xmlXPathObject">Structure </a>xmlXPathObject</h3><pre class="programlisting">struct _xmlXPathObject {
264: <a href="libxml2-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a> type
265: <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodesetval
266: int boolval
267: double floatval
268: <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * stringval
269: void * user
270: int index
271: void * user2
272: int index2
273: } xmlXPathObject;
274: </pre><p/>
275: </div>
276: <hr/>
277: <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectPtr">Typedef </a>xmlXPathObjectPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObject">xmlXPathObject</a> * xmlXPathObjectPtr;
278: </pre><p/>
279: </div>
280: <hr/>
281: <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectType">Enum </a>xmlXPathObjectType</h3><pre class="programlisting">enum <a href="#xmlXPathObjectType">xmlXPathObjectType</a> {
282: <a name="XPATH_UNDEFINED">XPATH_UNDEFINED</a> = 0
283: <a name="XPATH_NODESET">XPATH_NODESET</a> = 1
284: <a name="XPATH_BOOLEAN">XPATH_BOOLEAN</a> = 2
285: <a name="XPATH_NUMBER">XPATH_NUMBER</a> = 3
286: <a name="XPATH_STRING">XPATH_STRING</a> = 4
287: <a name="XPATH_POINT">XPATH_POINT</a> = 5
288: <a name="XPATH_RANGE">XPATH_RANGE</a> = 6
289: <a name="XPATH_LOCATIONSET">XPATH_LOCATIONSET</a> = 7
290: <a name="XPATH_USERS">XPATH_USERS</a> = 8
291: <a name="XPATH_XSLT_TREE">XPATH_XSLT_TREE</a> = 9 /* An XSLT value tree, non modifiable */
292: };
293: </pre><p/>
294: </div>
295: <hr/>
296: <div class="refsect2" lang="en"><h3><a name="xmlXPathParserContext">Structure </a>xmlXPathParserContext</h3><pre class="programlisting">struct _xmlXPathParserContext {
297: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur : the current char being parsed
298: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : the full expression
299: int error : error code
300: <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> context : the evaluation context
301: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the current value
302: int valueNr : number of values stacked
303: int valueMax : max number of values stacked
304: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> * valueTab : stack of values
305: <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp : the precompiled expression
306: int xptr : it this an XPointer expression
307: <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> ancestor : used for walking preceding axis
308: } xmlXPathParserContext;
309: </pre><p/>
310: </div>
311: <hr/>
312: <div class="refsect2" lang="en"><h3><a name="xmlXPathParserContextPtr">Typedef </a>xmlXPathParserContextPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> * xmlXPathParserContextPtr;
313: </pre><p/>
314: </div>
315: <hr/>
316: <div class="refsect2" lang="en"><h3><a name="xmlXPathType">Structure </a>xmlXPathType</h3><pre class="programlisting">struct _xmlXPathType {
317: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the type name
318: <a href="libxml2-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a> func : the conversion function
319: } xmlXPathType;
320: </pre><p/>
321: </div>
322: <hr/>
323: <div class="refsect2" lang="en"><h3><a name="xmlXPathTypePtr">Typedef </a>xmlXPathTypePtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathType">xmlXPathType</a> * xmlXPathTypePtr;
324: </pre><p/>
325: </div>
326: <hr/>
327: <div class="refsect2" lang="en"><h3><a name="xmlXPathVariable">Structure </a>xmlXPathVariable</h3><pre class="programlisting">struct _xmlXPathVariable {
328: const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the variable name
329: <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the value
330: } xmlXPathVariable;
331: </pre><p/>
332: </div>
333: <hr/>
334: <div class="refsect2" lang="en"><h3><a name="xmlXPathVariablePtr">Typedef </a>xmlXPathVariablePtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathVariable">xmlXPathVariable</a> * xmlXPathVariablePtr;
335: </pre><p/>
336: </div>
337: <hr/>
338: <div class="refsect2" lang="en"><h3><a name="xmlXPathAxisFunc"/>Function type xmlXPathAxisFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathAxisFunc (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur)<br/>
339: </pre><p>An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.</p>
340: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interpreter context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the previous node being explored on that axis</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next node in that axis or NULL if at the end of the axis.</td></tr></tbody></table></div></div>
341: <hr/>
342: <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertFunc"/>Function type xmlXPathConvertFunc</h3><pre class="programlisting">int xmlXPathConvertFunc (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type)<br/>
343: </pre><p>A conversion function is associated to a type and used to cast the new type to primitive values.</p>
344: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the number of the target type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
345: <hr/>
346: <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalFunc"/>Function type xmlXPathEvalFunc</h3><pre class="programlisting">void xmlXPathEvalFunc (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
347: </pre><p>An XPath evaluation function, the parameters are on the XPath context stack.</p>
348: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments passed to the function</td></tr></tbody></table></div></div>
349: <hr/>
350: <div class="refsect2" lang="en"><h3><a name="xmlXPathFuncLookupFunc"/>Function type xmlXPathFuncLookupFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFuncLookupFunc (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
351: </pre><p>Prototype for callbacks used to plug function lookup in the XPath engine.</p>
352: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the function</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath function or NULL if not found.</td></tr></tbody></table></div></div>
353: <hr/>
354: <div class="refsect2" lang="en"><h3><a name="xmlXPathFunction"/>Function type xmlXPathFunction</h3><pre class="programlisting">void xmlXPathFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
355: </pre><p>An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.</p>
356: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interprestation context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
357: <hr/>
358: <div class="refsect2" lang="en"><h3><a name="xmlXPathVariableLookupFunc"/>Function type xmlXPathVariableLookupFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupFunc (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
359: </pre><p>Prototype for callbacks used to plug variable lookup in the XPath engine.</p>
360: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the variable</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this variable</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object value or NULL if not found.</td></tr></tbody></table></div></div>
361: <hr/>
362: <div class="refsect2" lang="en"><h3><a name="xmlXPathNAN">Variable </a>xmlXPathNAN</h3><pre class="programlisting">double xmlXPathNAN;
363: </pre><p/>
364: </div>
365: <hr/>
366: <div class="refsect2" lang="en"><h3><a name="xmlXPathNINF">Variable </a>xmlXPathNINF</h3><pre class="programlisting">double xmlXPathNINF;
367: </pre><p/>
368: </div>
369: <hr/>
370: <div class="refsect2" lang="en"><h3><a name="xmlXPathPINF">Variable </a>xmlXPathPINF</h3><pre class="programlisting">double xmlXPathPINF;
371: </pre><p/>
372: </div>
373: <hr/>
374: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToNumber"/>xmlXPathCastBooleanToNumber ()</h3><pre class="programlisting">double xmlXPathCastBooleanToNumber (int val)<br/>
375: </pre><p>Converts a boolean to its number value</p>
376: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
377: <hr/>
378: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToString"/>xmlXPathCastBooleanToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastBooleanToString (int val)<br/>
379: </pre><p>Converts a boolean to its string value.</p>
380: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
381: <hr/>
382: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToBoolean"/>xmlXPathCastNodeSetToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNodeSetToBoolean (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
383: </pre><p>Converts a node-set to its boolean value</p>
384: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
385: <hr/>
386: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToNumber"/>xmlXPathCastNodeSetToNumber ()</h3><pre class="programlisting">double xmlXPathCastNodeSetToNumber (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
387: </pre><p>Converts a node-set to its number value</p>
388: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
389: <hr/>
390: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToString"/>xmlXPathCastNodeSetToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeSetToString (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
391: </pre><p>Converts a node-set to its string value.</p>
392: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
393: <hr/>
394: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToNumber"/>xmlXPathCastNodeToNumber ()</h3><pre class="programlisting">double xmlXPathCastNodeToNumber (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
395: </pre><p>Converts a node to its number value</p>
396: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
397: <hr/>
398: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToString"/>xmlXPathCastNodeToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeToString (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
399: </pre><p>Converts a node to its string value.</p>
400: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
401: <hr/>
402: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToBoolean"/>xmlXPathCastNumberToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNumberToBoolean (double val)<br/>
403: </pre><p>Converts a number to its boolean value</p>
404: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
405: <hr/>
406: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToString"/>xmlXPathCastNumberToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNumberToString (double val)<br/>
407: </pre><p>Converts a number to its string value.</p>
408: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
409: <hr/>
410: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToBoolean"/>xmlXPathCastStringToBoolean ()</h3><pre class="programlisting">int xmlXPathCastStringToBoolean (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
411: </pre><p>Converts a string to its boolean value</p>
412: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
413: <hr/>
414: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToNumber"/>xmlXPathCastStringToNumber ()</h3><pre class="programlisting">double xmlXPathCastStringToNumber (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
415: </pre><p>Converts a string to its number value</p>
416: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
417: <hr/>
418: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToBoolean"/>xmlXPathCastToBoolean ()</h3><pre class="programlisting">int xmlXPathCastToBoolean (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
419: </pre><p>Converts an XPath object to its boolean value</p>
420: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
421: <hr/>
422: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToNumber"/>xmlXPathCastToNumber ()</h3><pre class="programlisting">double xmlXPathCastToNumber (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
423: </pre><p>Converts an XPath object to its number value</p>
424: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
425: <hr/>
426: <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToString"/>xmlXPathCastToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastToString (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
427: </pre><p>Converts an existing object to its string() equivalent</p>
428: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().</td></tr></tbody></table></div></div>
429: <hr/>
430: <div class="refsect2" lang="en"><h3><a name="xmlXPathCmpNodes"/>xmlXPathCmpNodes ()</h3><pre class="programlisting">int xmlXPathCmpNodes (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
431: </pre><p>Compare two nodes w.r.t document order</p>
432: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node1</tt></i>:</span></td><td>the first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>the second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 in case of error 1 if first point < second point, 0 if it's the same node, -1 otherwise</td></tr></tbody></table></div></div>
433: <hr/>
434: <div class="refsect2" lang="en"><h3><a name="xmlXPathCompile"/>xmlXPathCompile ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCompile (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
435: </pre><p>Compile an XPath expression</p>
436: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
437: <hr/>
438: <div class="refsect2" lang="en"><h3><a name="xmlXPathCompiledEval"/>xmlXPathCompiledEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathCompiledEval (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
439: </pre><p>Evaluate the Precompiled XPath expression in the given context.</p>
440: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
441: <hr/>
442: <div class="refsect2" lang="en"><h3><a name="xmlXPathCompiledEvalToBoolean"/>xmlXPathCompiledEvalToBoolean ()</h3><pre class="programlisting">int xmlXPathCompiledEvalToBoolean (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
443: </pre><p>Applies the XPath boolean() function on the result of the given compiled expression.</p>
444: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.</td></tr></tbody></table></div></div>
445: <hr/>
446: <div class="refsect2" lang="en"><h3><a name="xmlXPathContextSetCache"/>xmlXPathContextSetCache ()</h3><pre class="programlisting">int xmlXPathContextSetCache (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options)<br/>
447: </pre><p>Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use <0 for the default number (100). Other values for @options have currently no effect.</p>
448: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>active</tt></i>:</span></td><td>enables/disables (creates/frees) the cache</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value with semantics dependant on @options</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (currently only the value 0 is used)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the setting succeeded, and -1 on API or internal errors.</td></tr></tbody></table></div></div>
449: <hr/>
450: <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertBoolean"/>xmlXPathConvertBoolean ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertBoolean (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
451: </pre><p>Converts an existing object to its boolean() equivalent</p>
452: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
453: <hr/>
454: <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertNumber"/>xmlXPathConvertNumber ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertNumber (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
455: </pre><p>Converts an existing object to its number() equivalent</p>
456: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
457: <hr/>
458: <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertString"/>xmlXPathConvertString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertString (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
459: </pre><p>Converts an existing object to its string() equivalent</p>
460: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
461: <hr/>
462: <div class="refsect2" lang="en"><h3><a name="xmlXPathCtxtCompile"/>xmlXPathCtxtCompile ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCtxtCompile (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
463: </pre><p>Compile an XPath expression</p>
464: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
465: <hr/>
466: <div class="refsect2" lang="en"><h3><a name="xmlXPathEval"/>xmlXPathEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEval (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
467: </pre><p>Evaluate the XPath Location Path in the given context.</p>
468: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
469: <hr/>
470: <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalExpression"/>xmlXPathEvalExpression ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEvalExpression (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
471: </pre><p>Evaluate the XPath expression in the given context.</p>
472: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
473: <hr/>
474: <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalPredicate"/>xmlXPathEvalPredicate ()</h3><pre class="programlisting">int xmlXPathEvalPredicate (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)<br/>
475: </pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
476: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div></div>
477: <hr/>
478: <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeCompExpr"/>xmlXPathFreeCompExpr ()</h3><pre class="programlisting">void xmlXPathFreeCompExpr (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp)<br/>
479: </pre><p>Free up the memory allocated by @comp</p>
480: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XPATH comp</td></tr></tbody></table></div></div>
481: <hr/>
482: <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeContext"/>xmlXPathFreeContext ()</h3><pre class="programlisting">void xmlXPathFreeContext (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
483: </pre><p>Free up an <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
484: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div></div>
485: <hr/>
486: <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSet"/>xmlXPathFreeNodeSet ()</h3><pre class="programlisting">void xmlXPathFreeNodeSet (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj)<br/>
487: </pre><p>Free the NodeSet compound (not the actual nodes !).</p>
488: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> to free</td></tr></tbody></table></div></div>
489: <hr/>
490: <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSetList"/>xmlXPathFreeNodeSetList ()</h3><pre class="programlisting">void xmlXPathFreeNodeSetList (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br/>
491: </pre><p>Free up the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject().</p>
492: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an existing NodeSetList object</td></tr></tbody></table></div></div>
493: <hr/>
494: <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeObject"/>xmlXPathFreeObject ()</h3><pre class="programlisting">void xmlXPathFreeObject (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br/>
495: </pre><p>Free up an <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> object.</p>
496: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the object to free</td></tr></tbody></table></div></div>
497: <hr/>
498: <div class="refsect2" lang="en"><h3><a name="xmlXPathInit"/>xmlXPathInit ()</h3><pre class="programlisting">void xmlXPathInit (void)<br/>
499: </pre><p>Initialize the XPath environment</p>
500: </div>
501: <hr/>
502: <div class="refsect2" lang="en"><h3><a name="xmlXPathIsInf"/>xmlXPathIsInf ()</h3><pre class="programlisting">int xmlXPathIsInf (double val)<br/>
503: </pre><p>Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/</p>
504: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise</td></tr></tbody></table></div></div>
505: <hr/>
506: <div class="refsect2" lang="en"><h3><a name="xmlXPathIsNaN"/>xmlXPathIsNaN ()</h3><pre class="programlisting">int xmlXPathIsNaN (double val)<br/>
507: </pre><p>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</p>
508: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the value is a NaN, 0 otherwise</td></tr></tbody></table></div></div>
509: <hr/>
510: <div class="refsect2" lang="en"><h3><a name="xmlXPathNewContext"/>xmlXPathNewContext ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPathNewContext (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
511: </pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
512: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div></div>
513: <hr/>
514: <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetCreate"/>xmlXPathNodeSetCreate ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
515: </pre><p>Create a new <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
516: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
517: <hr/>
518: <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectCopy"/>xmlXPathObjectCopy ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathObjectCopy (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
519: </pre><p>allocate a new copy of a given object</p>
520: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the original object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
521: <hr/>
522: <div class="refsect2" lang="en"><h3><a name="xmlXPathOrderDocElems"/>xmlXPathOrderDocElems ()</h3><pre class="programlisting">long xmlXPathOrderDocElems (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
523: </pre><p>Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
524: <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div></div>
525: <hr/>
526: </div>
527: </div>
528: </body>
529: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>