blob: a6b0ba40998bdce7ab98ce94503a5af037100c6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>pugixml: pugi::xpath_query Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6-NO -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="namespacepugi.html">pugi</a>::<a class="el" href="classpugi_1_1xpath__query.html">xpath_query</a></div>
<h1>pugi::xpath_query Class Reference</h1><!-- doxytag: class="pugi::xpath_query" -->Collaboration diagram for pugi::xpath_query:<p><center><img src="classpugi_1_1xpath__query__coll__graph.png" border="0" usemap="#pugi_1_1xpath__query__coll__map" alt="Collaboration graph"></center>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classpugi_1_1xpath__query-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A class that holds compiled XPath query and allows to evaluate query result.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#df3ce6efc17c1b58a1ff60bedb632140">xpath_query</a> (const char *query)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ctor from string with XPath expression. <a href="#df3ce6efc17c1b58a1ff60bedb632140"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0ca09e7de62e46feb64d03995f389da3"></a><!-- doxytag: member="pugi::xpath_query::~xpath_query" ref="0ca09e7de62e46feb64d03995f389da3" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#0ca09e7de62e46feb64d03995f389da3">~xpath_query</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dtor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#0b6e208704f8aec7130fdde78f526c9f">evaluate_boolean</a> (const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> &n)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate expression as boolean value for the context node <em>n</em>. <a href="#0b6e208704f8aec7130fdde78f526c9f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#0e04ba6218d5af799aca3c9a5921fde1">evaluate_number</a> (const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> &n)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate expression as double value for the context node <em>n</em>. <a href="#0e04ba6218d5af799aca3c9a5921fde1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#0327ba2d1a1dddac08f18d400856dafc">evaluate_string</a> (const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> &n)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate expression as string value for the context node <em>n</em>. <a href="#0327ba2d1a1dddac08f18d400856dafc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classpugi_1_1xpath__node__set.html">xpath_node_set</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpugi_1_1xpath__query.html#6d3db9ec25068ca3efccb5126de6b28d">evaluate_node_set</a> (const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> &n)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate expression as node set for the context node <em>n</em>. <a href="#6d3db9ec25068ca3efccb5126de6b28d"></a><br></td></tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="df3ce6efc17c1b58a1ff60bedb632140"></a><!-- doxytag: member="pugi::xpath_query::xpath_query" ref="df3ce6efc17c1b58a1ff60bedb632140" args="(const char *query)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">pugi::xpath_query::xpath_query </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [explicit]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Ctor from string with XPath expression.
<p>
Throws <a class="el" href="classpugi_1_1xpath__exception.html">xpath_exception</a> on compilation error, std::bad_alloc on out of memory error.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>query</em> </td><td>- string with XPath expression </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0b6e208704f8aec7130fdde78f526c9f"></a><!-- doxytag: member="pugi::xpath_query::evaluate_boolean" ref="0b6e208704f8aec7130fdde78f526c9f" args="(const xml_node &n)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">bool pugi::xpath_query::evaluate_boolean </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Evaluate expression as boolean value for the context node <em>n</em>.
<p>
If expression does not directly evaluate to boolean, the expression result is converted as through boolean() XPath function call. Throws std::bad_alloc on out of memory error.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>- context node </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>evaluation result </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="0e04ba6218d5af799aca3c9a5921fde1"></a><!-- doxytag: member="pugi::xpath_query::evaluate_number" ref="0e04ba6218d5af799aca3c9a5921fde1" args="(const xml_node &n)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">double pugi::xpath_query::evaluate_number </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Evaluate expression as double value for the context node <em>n</em>.
<p>
If expression does not directly evaluate to double, the expression result is converted as through number() XPath function call. Throws std::bad_alloc on out of memory error.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>- context node </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>evaluation result </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="0327ba2d1a1dddac08f18d400856dafc"></a><!-- doxytag: member="pugi::xpath_query::evaluate_string" ref="0327ba2d1a1dddac08f18d400856dafc" args="(const xml_node &n)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">std::string pugi::xpath_query::evaluate_string </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Evaluate expression as string value for the context node <em>n</em>.
<p>
If expression does not directly evaluate to string, the expression result is converted as through string() XPath function call. Throws std::bad_alloc on out of memory error.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>- context node </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>evaluation result </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="6d3db9ec25068ca3efccb5126de6b28d"></a><!-- doxytag: member="pugi::xpath_query::evaluate_node_set" ref="6d3db9ec25068ca3efccb5126de6b28d" args="(const xml_node &n)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classpugi_1_1xpath__node__set.html">xpath_node_set</a> pugi::xpath_query::evaluate_node_set </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classpugi_1_1xml__node.html">xml_node</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>n</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Evaluate expression as node set for the context node <em>n</em>.
<p>
If expression does not directly evaluate to node set, function returns empty node set. Throws std::bad_alloc on out of memory error.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>- context node </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>evaluation result </dd></dl>
</td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Jan 25 23:51:32 2009 for pugixml by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
</body>
</html>
|