Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xpath</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css"> |
| 2 | .synopsis, .classsynopsis { |
| 3 | background: #eeeeee; |
| 4 | border: solid 1px #aaaaaa; |
| 5 | padding: 0.5em; |
| 6 | } |
| 7 | .programlisting { |
| 8 | background: #eeeeff; |
| 9 | border: solid 1px #aaaaff; |
| 10 | padding: 0.5em; |
| 11 | } |
| 12 | .variablelist { |
| 13 | padding: 4px; |
| 14 | margin-left: 3em; |
| 15 | } |
| 16 | .navigation { |
| 17 | background: #ffeeee; |
| 18 | border: solid 1px #ffaaaa; |
| 19 | margin-top: 0.5em; |
| 20 | margin-bottom: 0.5em; |
| 21 | } |
| 22 | .navigation a { |
| 23 | color: #770000; |
| 24 | } |
| 25 | .navigation a:visited { |
| 26 | color: #550000; |
| 27 | } |
| 28 | .navigation .title { |
| 29 | font-size: 200%; |
| 30 | } |
| 31 | </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-HTMLtree.html" title="HTMLtree"><link rel="next" href="libxml-xpathInternals.html" title="xpathInternals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-HTMLtree.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-xpathInternals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-xpath"></a><div class="titlepage"></div><div class="refnamediv"><h2>xpath</h2><p>xpath — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> |
Daniel Veillard | 1566d3a | 1999-07-15 14:24:29 +0000 | [diff] [blame] | 32 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 33 | |
| 34 | |
| 35 | struct <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a>; |
| 36 | typedef <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a>; |
| 37 | struct <a href="libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a>; |
| 38 | typedef <a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a>; |
| 39 | enum <a href="libxml-xpath.html#xmlXPathError">xmlXPathError</a>; |
| 40 | struct <a href="libxml-xpath.html#xmlNodeSet">xmlNodeSet</a>; |
| 41 | typedef <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a>; |
| 42 | enum <a href="libxml-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a>; |
| 43 | struct <a href="libxml-xpath.html#xmlXPathObject">xmlXPathObject</a>; |
| 44 | typedef <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a>; |
| 45 | int (<a href="libxml-xpath.html#xmlXPathConvertFunc">*xmlXPathConvertFunc</a>) (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 46 | int type); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 47 | struct <a href="libxml-xpath.html#xmlXPathType">xmlXPathType</a>; |
| 48 | typedef <a href="libxml-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a>; |
| 49 | struct <a href="libxml-xpath.html#xmlXPathVariable">xmlXPathVariable</a>; |
| 50 | typedef <a href="libxml-xpath.html#xmlXPathVariablePtr">xmlXPathVariablePtr</a>; |
| 51 | void (<a href="libxml-xpath.html#xmlXPathEvalFunc">*xmlXPathEvalFunc</a>) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
Daniel Veillard | 7f7d111 | 1999-09-22 09:46:25 +0000 | [diff] [blame] | 52 | int nargs); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 53 | struct <a href="libxml-xpath.html#xmlXPathFunct">xmlXPathFunct</a>; |
| 54 | typedef <a href="libxml-xpath.html#xmlXPathFuncPtr">xmlXPathFuncPtr</a>; |
| 55 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> (<a href="libxml-xpath.html#xmlXPathAxisFunc">*xmlXPathAxisFunc</a>) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
| 56 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur); |
| 57 | struct <a href="libxml-xpath.html#xmlXPathAxis">xmlXPathAxis</a>; |
| 58 | typedef <a href="libxml-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a>; |
| 59 | struct <a href="libxml-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a>; |
| 60 | typedef <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a>; |
| 61 | void (<a href="libxml-xpath.html#xmlXPathFunction">*xmlXPathFunction</a>) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
Daniel Veillard | 06622df | 2002-01-21 17:53:42 +0000 | [diff] [blame] | 62 | int nargs); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 63 | int <a href="libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val); |
| 64 | int <a href="libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val); |
| 65 | #define <a href="libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a> (ns) |
| 66 | #define <a href="libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a> (ns, index) |
| 67 | #define <a href="libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a> (ns) |
| 68 | void <a href="libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj); |
| 69 | <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val); |
| 70 | void <a href="libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj); |
| 71 | void <a href="libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj); |
| 72 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 73 | int <a href="libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node1, |
| 74 | <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2); |
| 75 | int <a href="libxml-xpath.html#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val); |
| 76 | int <a href="libxml-xpath.html#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val); |
| 77 | int <a href="libxml-xpath.html#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns); |
| 78 | int <a href="libxml-xpath.html#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 79 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a> (int val); |
| 80 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val); |
| 81 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node); |
| 82 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns); |
| 83 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 84 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xpath.html#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a> (int val); |
| 85 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val); |
| 86 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node); |
| 87 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns); |
| 88 | <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 89 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 90 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 91 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val); |
| 92 | void <a href="libxml-xpath.html#xmlXPathInit">xmlXPathInit</a> (void); |
| 93 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); |
| 94 | void <a href="libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt); |
| 95 | <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long">long</GTKDOCLINK> <a href="libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); |
| 96 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathEval">xmlXPathEval</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str, |
| 97 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx); |
| 98 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str, |
| 99 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt); |
| 100 | int <a href="libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, |
| 101 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res); |
| 102 | <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str); |
| 103 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a> (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, |
| 104 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx); |
| 105 | void <a href="libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a> (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp); |
| 106 | </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| 107 | |
| 108 | </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlXPathContext"></a>struct xmlXPathContext</h3><pre class="programlisting">struct xmlXPathContext { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 109 | xmlDocPtr doc; /* The current document */ |
| 110 | xmlNodePtr node; /* The current node */ |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 111 | |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 112 | int nb_variables_unused; /* unused (hash table) */ |
| 113 | int max_variables_unused; /* unused (hash table) */ |
| 114 | xmlHashTablePtr varHash; /* Hash table of defined variables */ |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 115 | |
| 116 | int nb_types; /* number of defined types */ |
| 117 | int max_types; /* max number of types */ |
Daniel Veillard | b732a0e | 2000-10-15 11:27:01 +0000 | [diff] [blame] | 118 | xmlXPathTypePtr types; /* Array of defined types */ |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 119 | |
Daniel Veillard | 29a11cc | 2000-10-25 13:32:39 +0000 | [diff] [blame] | 120 | int nb_funcs_unused; /* unused (hash table) */ |
| 121 | int max_funcs_unused; /* unused (hash table) */ |
| 122 | xmlHashTablePtr funcHash; /* Hash table of defined funcs */ |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 123 | |
| 124 | int nb_axis; /* number of defined axis */ |
| 125 | int max_axis; /* max number of axis */ |
Daniel Veillard | b732a0e | 2000-10-15 11:27:01 +0000 | [diff] [blame] | 126 | xmlXPathAxisPtr axis; /* Array of defined axis */ |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 127 | |
Daniel Veillard | 503b893 | 2001-01-05 06:36:31 +0000 | [diff] [blame] | 128 | /* the namespace nodes of the context node */ |
| 129 | xmlNsPtr *namespaces; /* Array of namespaces */ |
| 130 | int nsNr; /* number of namespace in scope */ |
| 131 | void *user; /* function to free */ |
Daniel Veillard | 3bff2b0 | 2000-10-01 20:33:47 +0000 | [diff] [blame] | 132 | |
| 133 | /* extra variables */ |
| 134 | int contextSize; /* the context size */ |
| 135 | int proximityPosition; /* the proximity position */ |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 136 | |
| 137 | /* extra stuff for XPointer */ |
| 138 | int xptr; /* it this an XPointer context */ |
| 139 | xmlNodePtr here; /* for here() */ |
| 140 | xmlNodePtr origin; /* for origin() */ |
Daniel Veillard | 503b893 | 2001-01-05 06:36:31 +0000 | [diff] [blame] | 141 | |
| 142 | /* the set of namespace declarations in scope for the expression */ |
| 143 | xmlHashTablePtr nsHash; /* The namespaces hash table */ |
Daniel Veillard | 9cb5ff4 | 2001-01-29 08:22:21 +0000 | [diff] [blame] | 144 | void *varLookupFunc; /* variable lookup func */ |
| 145 | void *varLookupData; /* variable lookup data */ |
| 146 | |
| 147 | /* Possibility to link in an extra item */ |
| 148 | void *extra; /* needed for XSLT */ |
Daniel Veillard | 4ec885a | 2001-06-17 10:31:07 +0000 | [diff] [blame] | 149 | |
| 150 | /* The function name and URI when calling a function */ |
| 151 | const xmlChar *function; |
| 152 | const xmlChar *functionURI; |
Daniel Veillard | e7ead2d | 2001-08-22 23:44:09 +0000 | [diff] [blame] | 153 | |
| 154 | /* function lookup function and data */ |
| 155 | void *funcLookupFunc; /* function lookup func */ |
| 156 | void *funcLookupData; /* function lookup data */ |
| 157 | |
| 158 | /* temporary namespace lists kept for walking the namespace axis */ |
| 159 | xmlNsPtr *tmpNsList; /* Array of namespaces */ |
| 160 | int tmpNsNr; /* number of namespace in scope */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 161 | }; |
| 162 | </pre><p> |
| 163 | Expression evaluation occurs with respect to a context. |
Daniel Veillard | e7ead2d | 2001-08-22 23:44:09 +0000 | [diff] [blame] | 164 | he context consists of: |
Daniel Veillard | aec6356 | 2003-03-23 20:42:17 +0000 | [diff] [blame] | 165 | - a node (the context node) |
| 166 | - a node list (the context node list) |
| 167 | - a set of variable bindings |
| 168 | - a function library |
| 169 | - the set of namespace declarations in scope for the expression |
Daniel Veillard | e7ead2d | 2001-08-22 23:44:09 +0000 | [diff] [blame] | 170 | Following the switch to hash tables, this need to be trimmed up at |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 171 | the next binary incompatible release.</p><p> |
| 172 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 173 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathContextPtr"></a>xmlXPathContextPtr</h3><pre class="programlisting">typedef xmlXPathContext *xmlXPathContextPtr; |
| 174 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 175 | |
| 176 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathParserContext"></a>struct xmlXPathParserContext</h3><pre class="programlisting">struct xmlXPathParserContext { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 177 | const xmlChar *cur; /* the current char being parsed */ |
| 178 | const xmlChar *base; /* the full expression */ |
| 179 | |
| 180 | int error; /* error code */ |
| 181 | |
| 182 | xmlXPathContextPtr context; /* the evaluation context */ |
| 183 | xmlXPathObjectPtr value; /* the current value */ |
| 184 | int valueNr; /* number of values stacked */ |
| 185 | int valueMax; /* max number of values stacked */ |
| 186 | xmlXPathObjectPtr *valueTab; /* stack of values */ |
Daniel Veillard | c7ad7ce | 2001-03-22 21:45:29 +0000 | [diff] [blame] | 187 | |
| 188 | xmlXPathCompExprPtr comp; /* the precompiled expression */ |
| 189 | int xptr; /* it this an XPointer expression */ |
Daniel Veillard | 4b8328d | 2001-07-05 22:48:42 +0000 | [diff] [blame] | 190 | xmlNodePtr ancestor; /* used for walking preceding axis */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 191 | }; |
| 192 | </pre><p> |
| 193 | An XPath parser context. It contains pure parsing informations, |
| 194 | an xmlXPathContext, and the stack of objects.</p><p> |
| 195 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 196 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathParserContextPtr"></a>xmlXPathParserContextPtr</h3><pre class="programlisting">typedef xmlXPathParserContext *xmlXPathParserContextPtr; |
| 197 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 198 | |
| 199 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathError"></a>enum xmlXPathError</h3><pre class="programlisting">typedef enum { |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 200 | XPATH_EXPRESSION_OK = 0, |
| 201 | XPATH_NUMBER_ERROR, |
| 202 | XPATH_UNFINISHED_LITERAL_ERROR, |
| 203 | XPATH_START_LITERAL_ERROR, |
| 204 | XPATH_VARIABLE_REF_ERROR, |
| 205 | XPATH_UNDEF_VARIABLE_ERROR, |
| 206 | XPATH_INVALID_PREDICATE_ERROR, |
| 207 | XPATH_EXPR_ERROR, |
| 208 | XPATH_UNCLOSED_ERROR, |
| 209 | XPATH_UNKNOWN_FUNC_ERROR, |
| 210 | XPATH_INVALID_OPERAND, |
| 211 | XPATH_INVALID_TYPE, |
| 212 | XPATH_INVALID_ARITY, |
| 213 | XPATH_INVALID_CTXT_SIZE, |
Daniel Veillard | b732a0e | 2000-10-15 11:27:01 +0000 | [diff] [blame] | 214 | XPATH_INVALID_CTXT_POSITION, |
| 215 | XPATH_MEMORY_ERROR, |
| 216 | XPTR_SYNTAX_ERROR, |
| 217 | XPTR_RESOURCE_ERROR, |
Daniel Veillard | 503b893 | 2001-01-05 06:36:31 +0000 | [diff] [blame] | 218 | XPTR_SUB_RESOURCE_ERROR, |
Daniel Veillard | 3bbbe6f | 2001-05-03 11:15:37 +0000 | [diff] [blame] | 219 | XPATH_UNDEF_PREFIX_ERROR, |
| 220 | XPATH_ENCODING_ERROR, |
| 221 | XPATH_INVALID_CHAR_ERROR |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 222 | } xmlXPathError; |
| 223 | </pre><p> |
| 224 | |
| 225 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNodeSet"></a>struct xmlNodeSet</h3><pre class="programlisting">struct xmlNodeSet { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 226 | int nodeNr; /* number of nodes in the set */ |
| 227 | int nodeMax; /* size of the array as allocated */ |
| 228 | xmlNodePtr *nodeTab; /* array of nodes in no particular order */ |
Daniel Veillard | af43f63 | 2002-03-08 15:05:20 +0000 | [diff] [blame] | 229 | /* @@ with_ns to check wether namespace nodes should be looked at @@ */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 230 | }; |
| 231 | </pre><p> |
| 232 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 233 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNodeSetPtr"></a>xmlNodeSetPtr</h3><pre class="programlisting">typedef xmlNodeSet *xmlNodeSetPtr; |
| 234 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 235 | |
| 236 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathObjectType"></a>enum xmlXPathObjectType</h3><pre class="programlisting">typedef enum { |
Daniel Veillard | 3bff2b0 | 2000-10-01 20:33:47 +0000 | [diff] [blame] | 237 | XPATH_UNDEFINED = 0, |
| 238 | XPATH_NODESET = 1, |
| 239 | XPATH_BOOLEAN = 2, |
| 240 | XPATH_NUMBER = 3, |
| 241 | XPATH_STRING = 4, |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 242 | XPATH_POINT = 5, |
| 243 | XPATH_RANGE = 6, |
| 244 | XPATH_LOCATIONSET = 7, |
Daniel Veillard | 9cb5ff4 | 2001-01-29 08:22:21 +0000 | [diff] [blame] | 245 | XPATH_USERS = 8, |
| 246 | XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 247 | } xmlXPathObjectType; |
| 248 | </pre><p> |
| 249 | |
| 250 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathObject"></a>struct xmlXPathObject</h3><pre class="programlisting">struct xmlXPathObject { |
Daniel Veillard | 3bff2b0 | 2000-10-01 20:33:47 +0000 | [diff] [blame] | 251 | xmlXPathObjectType type; |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 252 | xmlNodeSetPtr nodesetval; |
| 253 | int boolval; |
| 254 | double floatval; |
| 255 | xmlChar *stringval; |
| 256 | void *user; |
Daniel Veillard | 7e99c63 | 2000-10-06 12:59:53 +0000 | [diff] [blame] | 257 | int index; |
| 258 | void *user2; |
| 259 | int index2; |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 260 | }; |
| 261 | </pre><p> |
| 262 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 263 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathObjectPtr"></a>xmlXPathObjectPtr</h3><pre class="programlisting">typedef xmlXPathObject *xmlXPathObjectPtr; |
| 264 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 265 | |
| 266 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathConvertFunc"></a>xmlXPathConvertFunc ()</h3><pre class="programlisting">int (*xmlXPathConvertFunc) (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, |
| 267 | int type);</pre><p> |
| 268 | A conversion function is associated to a type and used to cast |
| 269 | the new type to primitive values.</p><p> |
| 270 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 271 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>obj</tt></i> :</span></td><td> an XPath object |
| 272 | </td></tr><tr><td><span class="term"><i><tt>type</tt></i> :</span></td><td> the number of the target type |
| 273 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case of error, 0 otherwise |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 274 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathType"></a>struct xmlXPathType</h3><pre class="programlisting">struct xmlXPathType { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 275 | const xmlChar *name; /* the type name */ |
| 276 | xmlXPathConvertFunc func; /* the conversion function */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 277 | }; |
| 278 | </pre><p> |
| 279 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 280 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathTypePtr"></a>xmlXPathTypePtr</h3><pre class="programlisting">typedef xmlXPathType *xmlXPathTypePtr; |
| 281 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 282 | |
| 283 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathVariable"></a>struct xmlXPathVariable</h3><pre class="programlisting">struct xmlXPathVariable { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 284 | const xmlChar *name; /* the variable name */ |
| 285 | xmlXPathObjectPtr value; /* the value */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 286 | }; |
| 287 | </pre><p> |
| 288 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 289 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathVariablePtr"></a>xmlXPathVariablePtr</h3><pre class="programlisting">typedef xmlXPathVariable *xmlXPathVariablePtr; |
| 290 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 291 | |
| 292 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathEvalFunc"></a>xmlXPathEvalFunc ()</h3><pre class="programlisting">void (*xmlXPathEvalFunc) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
| 293 | int nargs);</pre><p> |
| 294 | An XPath evaluation function, the parameters are on the XPath context stack.</p><p> |
| 295 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 296 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> an XPath parser context |
| 297 | </td></tr><tr><td><span class="term"><i><tt>nargs</tt></i> :</span></td><td> the number of arguments passed to the function |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 298 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFunct"></a>struct xmlXPathFunct</h3><pre class="programlisting">struct xmlXPathFunct { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 299 | const xmlChar *name; /* the function name */ |
| 300 | xmlXPathEvalFunc func; /* the evaluation function */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 301 | }; |
| 302 | </pre><p> |
| 303 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 304 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFuncPtr"></a>xmlXPathFuncPtr</h3><pre class="programlisting">typedef xmlXPathFunct *xmlXPathFuncPtr; |
| 305 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 306 | |
| 307 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathAxisFunc"></a>xmlXPathAxisFunc ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> (*xmlXPathAxisFunc) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
| 308 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur);</pre><p> |
| 309 | An axis traversal function. To traverse an axis, the engine calls |
Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 310 | the first time with cur == NULL and repeat until the function returns |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 311 | NULL indicating the end of the axis traversal.</p><p> |
| 312 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 313 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the XPath interpreter context |
| 314 | </td></tr><tr><td><span class="term"><i><tt>cur</tt></i> :</span></td><td> the previous node being explored on that axis |
| 315 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the next node in that axis or NULL if at the end of the axis. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 316 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathAxis"></a>struct xmlXPathAxis</h3><pre class="programlisting">struct xmlXPathAxis { |
Daniel Veillard | 3f6f7f6 | 2000-06-30 17:58:25 +0000 | [diff] [blame] | 317 | const xmlChar *name; /* the axis name */ |
| 318 | xmlXPathAxisFunc func; /* the search function */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 319 | }; |
| 320 | </pre><p> |
| 321 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 322 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathAxisPtr"></a>xmlXPathAxisPtr</h3><pre class="programlisting">typedef xmlXPathAxis *xmlXPathAxisPtr; |
| 323 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 324 | |
| 325 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCompExpr"></a>struct xmlXPathCompExpr</h3><pre class="programlisting">struct xmlXPathCompExpr;</pre><p> |
| 326 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 327 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCompExprPtr"></a>xmlXPathCompExprPtr</h3><pre class="programlisting">typedef xmlXPathCompExpr *xmlXPathCompExprPtr; |
| 328 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 329 | |
| 330 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFunction"></a>xmlXPathFunction ()</h3><pre class="programlisting">void (*xmlXPathFunction) (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, |
| 331 | int nargs);</pre><p> |
| 332 | An XPath function. |
Daniel Veillard | 5f4b599 | 2002-02-20 10:22:49 +0000 | [diff] [blame] | 333 | The arguments (if any) are popped out from the context stack |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 334 | and the result is pushed on the stack.</p><p> |
| 335 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 336 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the XPath interprestation context |
| 337 | </td></tr><tr><td><span class="term"><i><tt>nargs</tt></i> :</span></td><td> the number of arguments |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 338 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathIsNaN"></a>xmlXPathIsNaN ()</h3><pre class="programlisting">int xmlXPathIsNaN (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val);</pre><p> |
| 339 | Provides a portable <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="isnan">isnan</GTKDOCLINK>() function to detect whether a double |
Daniel Veillard | e7ead2d | 2001-08-22 23:44:09 +0000 | [diff] [blame] | 340 | is a NotaNumber. Based on trio code |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 341 | http://sourceforge.net/projects/ctrio/</p><p> |
| 342 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 343 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a double value |
| 344 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if the value is a NaN, 0 otherwise |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 345 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathIsInf"></a>xmlXPathIsInf ()</h3><pre class="programlisting">int xmlXPathIsInf (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val);</pre><p> |
| 346 | Provides a portable <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="isinf">isinf</GTKDOCLINK>() function to detect whether a double |
Daniel Veillard | e7ead2d | 2001-08-22 23:44:09 +0000 | [diff] [blame] | 347 | is a +Infinite or -Infinite. Based on trio code |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 348 | http://sourceforge.net/projects/ctrio/</p><p> |
| 349 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 350 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a double value |
| 351 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise |
| 352 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetGetLength"></a>xmlXPathNodeSetGetLength()</h3><pre class="programlisting">#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0) |
| 353 | </pre><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 354 | Implement a functionality similar to the DOM NodeList.length.</p><p> |
| 355 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 356 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 357 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetItem"></a>xmlXPathNodeSetItem()</h3><pre class="programlisting">#define xmlXPathNodeSetItem(ns, index)</pre><p> |
| 358 | Implements a functionality similar to the DOM NodeList.<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="item">item</GTKDOCLINK>().</p><p> |
| 359 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 360 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
| 361 | </td></tr><tr><td><span class="term"><i><tt>index</tt></i> :</span></td><td> index of a node in the set |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 362 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetIsEmpty"></a>xmlXPathNodeSetIsEmpty()</h3><pre class="programlisting">#define xmlXPathNodeSetIsEmpty(ns)</pre><p> |
| 363 | Checks whether <i><tt>ns</tt></i> is empty or not.</p><p> |
| 364 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 365 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 366 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFreeObject"></a>xmlXPathFreeObject ()</h3><pre class="programlisting">void xmlXPathFreeObject (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);</pre><p> |
| 367 | Free up an xmlXPathObjectPtr object.</p><p> |
| 368 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 369 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>obj</tt></i> :</span></td><td> the object to free |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 370 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetCreate"></a>xmlXPathNodeSetCreate ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val);</pre><p> |
| 371 | Create a new xmlNodeSetPtr of type double and of value <i><tt>val</tt></i></p><p> |
| 372 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 373 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an initial xmlNodePtr, or NULL |
| 374 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the newly created object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 375 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSetList"></a>xmlXPathFreeNodeSetList ()</h3><pre class="programlisting">void xmlXPathFreeNodeSetList (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);</pre><p> |
| 376 | Free up the xmlXPathObjectPtr <i><tt>obj</tt></i> but don't deallocate the objects in |
| 377 | the list contrary to <a href="libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a>().</p><p> |
| 378 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 379 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>obj</tt></i> :</span></td><td> an existing NodeSetList object |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 380 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSet"></a>xmlXPathFreeNodeSet ()</h3><pre class="programlisting">void xmlXPathFreeNodeSet (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj);</pre><p> |
| 381 | Free the NodeSet compound (not the actual nodes !).</p><p> |
| 382 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 383 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>obj</tt></i> :</span></td><td> the xmlNodeSetPtr to free |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 384 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathObjectCopy"></a>xmlXPathObjectCopy ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathObjectCopy (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 385 | allocate a new copy of a given object</p><p> |
| 386 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 387 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> the original object |
| 388 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the newly created object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 389 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCmpNodes"></a>xmlXPathCmpNodes ()</h3><pre class="programlisting">int xmlXPathCmpNodes (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node1, |
| 390 | <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2);</pre><p> |
| 391 | Compare two nodes w.r.t document order</p><p> |
| 392 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 393 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>node1</tt></i> :</span></td><td> the first node |
| 394 | </td></tr><tr><td><span class="term"><i><tt>node2</tt></i> :</span></td><td> the second node |
| 395 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-2 in case of error 1 if first point < second point, 0 if |
| 396 | that's the same node, -1 otherwise |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 397 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToBoolean"></a>xmlXPathCastNumberToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNumberToBoolean (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val);</pre><p> |
| 398 | Converts a number to its boolean value</p><p> |
| 399 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 400 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a number |
| 401 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the boolean value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 402 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToBoolean"></a>xmlXPathCastStringToBoolean ()</h3><pre class="programlisting">int xmlXPathCastStringToBoolean (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);</pre><p> |
| 403 | Converts a string to its boolean value</p><p> |
| 404 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 405 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a string |
| 406 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the boolean value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 407 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToBoolean"></a>xmlXPathCastNodeSetToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNodeSetToBoolean (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);</pre><p> |
| 408 | Converts a node-set to its boolean value</p><p> |
| 409 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 410 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
| 411 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the boolean value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 412 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastToBoolean"></a>xmlXPathCastToBoolean ()</h3><pre class="programlisting">int xmlXPathCastToBoolean (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 413 | Converts an XPath object to its boolean value</p><p> |
| 414 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 415 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 416 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the boolean value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 417 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToNumber"></a>xmlXPathCastBooleanToNumber ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> xmlXPathCastBooleanToNumber (int val);</pre><p> |
| 418 | Converts a boolean to its number value</p><p> |
| 419 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 420 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a boolean |
| 421 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 422 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToNumber"></a>xmlXPathCastStringToNumber ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> xmlXPathCastStringToNumber (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *val);</pre><p> |
| 423 | Converts a string to its number value</p><p> |
| 424 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 425 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a string |
| 426 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 427 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToNumber"></a>xmlXPathCastNodeToNumber ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> xmlXPathCastNodeToNumber (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);</pre><p> |
| 428 | Converts a node to its number value</p><p> |
| 429 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 430 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>node</tt></i> :</span></td><td> a node |
| 431 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 432 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToNumber"></a>xmlXPathCastNodeSetToNumber ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> xmlXPathCastNodeSetToNumber (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);</pre><p> |
| 433 | Converts a node-set to its number value</p><p> |
| 434 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 435 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
| 436 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 437 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastToNumber"></a>xmlXPathCastToNumber ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> xmlXPathCastToNumber (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 438 | Converts an XPath object to its number value</p><p> |
| 439 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 440 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 441 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number value |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 442 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToString"></a>xmlXPathCastBooleanToString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlXPathCastBooleanToString (int val);</pre><p> |
| 443 | Converts a boolean to its string value.</p><p> |
| 444 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 445 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a boolean |
| 446 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a newly allocated string. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 447 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToString"></a>xmlXPathCastNumberToString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlXPathCastNumberToString (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="double">double</GTKDOCLINK> val);</pre><p> |
| 448 | Converts a number to its string value.</p><p> |
| 449 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 450 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> a number |
| 451 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a newly allocated string. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 452 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToString"></a>xmlXPathCastNodeToString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlXPathCastNodeToString (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node);</pre><p> |
| 453 | Converts a node to its string value.</p><p> |
| 454 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 455 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>node</tt></i> :</span></td><td> a node |
| 456 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a newly allocated string. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 457 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToString"></a>xmlXPathCastNodeSetToString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlXPathCastNodeSetToString (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);</pre><p> |
| 458 | Converts a node-set to its string value.</p><p> |
| 459 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 460 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ns</tt></i> :</span></td><td> a node-set |
| 461 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a newly allocated string. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 462 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCastToString"></a>xmlXPathCastToString ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlXPathCastToString (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 463 | Converts an existing object to its <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="string">string</GTKDOCLINK>() equivalent</p><p> |
| 464 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 465 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 466 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the string value of the object, NULL in case of error. |
| 467 | A new string is allocated only if needed (<i><tt>val</tt></i> isn't a |
| 468 | string object). |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 469 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathConvertBoolean"></a>xmlXPathConvertBoolean ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertBoolean (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 470 | Converts an existing object to its <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="boolean">boolean</GTKDOCLINK>() equivalent</p><p> |
| 471 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 472 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 473 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new object, the old one is freed (or the operation |
| 474 | is done directly on <i><tt>val</tt></i>) |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 475 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathConvertNumber"></a>xmlXPathConvertNumber ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertNumber (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 476 | Converts an existing object to its <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="number">number</GTKDOCLINK>() equivalent</p><p> |
| 477 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 478 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 479 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new object, the old one is freed (or the operation |
| 480 | is done directly on <i><tt>val</tt></i>) |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 481 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathConvertString"></a>xmlXPathConvertString ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertString (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);</pre><p> |
| 482 | Converts an existing object to its <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="string">string</GTKDOCLINK>() equivalent</p><p> |
| 483 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 484 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>val</tt></i> :</span></td><td> an XPath object |
| 485 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new object, the old one is freed (or the operation |
| 486 | is done directly on <i><tt>val</tt></i>) |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 487 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathInit"></a>xmlXPathInit ()</h3><pre class="programlisting">void xmlXPathInit (void);</pre><p> |
| 488 | Initialize the XPath environment</p><p> |
| 489 | |
| 490 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathNewContext"></a>xmlXPathNewContext ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPathNewContext (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> |
| 491 | Create a new xmlXPathContext</p><p> |
| 492 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 493 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> the XML document |
| 494 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlXPathContext just allocated. The caller will need to free it. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 495 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFreeContext"></a>xmlXPathFreeContext ()</h3><pre class="programlisting">void xmlXPathFreeContext (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);</pre><p> |
| 496 | Free up an xmlXPathContext</p><p> |
| 497 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 498 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the context to free |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 499 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathOrderDocElems"></a>xmlXPathOrderDocElems ()</h3><pre class="programlisting"><GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long">long</GTKDOCLINK> xmlXPathOrderDocElems (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> |
| 500 | Call this routine to speed up XPath computation on static documents. |
Daniel Veillard | c2d4a93 | 2003-04-01 11:13:05 +0000 | [diff] [blame] | 501 | This stamps all the element nodes with the document order |
| 502 | Like for line information, the order is kept in the element->content |
| 503 | field, the value stored is actually - the node number (startting at -1) |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 504 | to be able to differenciate from line numbers.</p><p> |
| 505 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 506 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td> an input document |
| 507 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of element found in the document or -1 in case |
| 508 | of error. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 509 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathEval"></a>xmlXPathEval ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEval (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str, |
| 510 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);</pre><p> |
| 511 | Evaluate the XPath Location Path in the given context.</p><p> |
| 512 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 513 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td> the XPath expression |
| 514 | </td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the XPath context |
| 515 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlXPathObjectPtr resulting from the evaluation or NULL. |
| 516 | the caller has to free the object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 517 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathEvalExpression"></a>xmlXPathEvalExpression ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEvalExpression (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str, |
| 518 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);</pre><p> |
| 519 | Evaluate the XPath expression in the given context.</p><p> |
| 520 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 521 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td> the XPath expression |
| 522 | </td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the XPath context |
| 523 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlXPathObjectPtr resulting from the evaluation or NULL. |
| 524 | the caller has to free the object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 525 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathEvalPredicate"></a>xmlXPathEvalPredicate ()</h3><pre class="programlisting">int xmlXPathEvalPredicate (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, |
| 526 | <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res);</pre><p> |
| 527 | Evaluate a predicate result for the current node. |
Daniel Veillard | c7ad7ce | 2001-03-22 21:45:29 +0000 | [diff] [blame] | 528 | A PredicateExpr is evaluated by evaluating the Expr and converting |
| 529 | the result to a boolean. If the result is a number, the result will |
| 530 | be converted to true if the number is equal to the position of the |
| 531 | context node in the context node list (as returned by the position |
| 532 | function) and will be converted to false otherwise; if the result |
| 533 | is not a number, then the result will be converted as if by a call |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 534 | to the boolean function.</p><p> |
| 535 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 536 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> the XPath context |
| 537 | </td></tr><tr><td><span class="term"><i><tt>res</tt></i> :</span></td><td> the Predicate Expression evaluation result |
| 538 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if predicate is true, 0 otherwise |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 539 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCompile"></a>xmlXPathCompile ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCompile (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str);</pre><p> |
| 540 | Compile an XPath expression</p><p> |
| 541 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 542 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>str</tt></i> :</span></td><td> the XPath expression |
| 543 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlXPathCompExprPtr resulting from the compilation or NULL. |
| 544 | the caller has to free the object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 545 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathCompiledEval"></a>xmlXPathCompiledEval ()</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathCompiledEval (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, |
| 546 | <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);</pre><p> |
| 547 | Evaluate the Precompiled XPath expression in the given context.</p><p> |
| 548 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 549 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>comp</tt></i> :</span></td><td> the compiled XPath expression |
| 550 | </td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the XPath context |
| 551 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlXPathObjectPtr resulting from the evaluation or NULL. |
| 552 | the caller has to free the object. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 553 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlXPathFreeCompExpr"></a>xmlXPathFreeCompExpr ()</h3><pre class="programlisting">void xmlXPathFreeCompExpr (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp);</pre><p> |
| 554 | Free up the memory allocated by <i><tt>comp</tt></i></p><p> |
| 555 | |
Daniel Veillard | d7cec92 | 2003-06-13 12:30:10 +0000 | [diff] [blame] | 556 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>comp</tt></i> :</span></td><td> an XPATH comp |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 557 | </td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-HTMLtree.html"><b><< HTMLtree</b></a></td><td align="right"><a accesskey="n" href="libxml-xpathInternals.html"><b>xpathInternals >></b></a></td></tr></table></body></html> |