summaryrefslogtreecommitdiff
path: root/zenxml/doc/classzen_1_1_xml_element.html
blob: 17eef773fe49bec3c1318bbf3cc9df641fe70a83 (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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>zen::Xml: zen::XmlElement Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="zenXml.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">zen::Xml
   </div>
   <div id="projectbrief">Simple C++  XML Processing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacezen.html">zen</a></li><li class="navelem"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classzen_1_1_xml_element-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">zen::XmlElement Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>An XML element.  
 <a href="classzen_1_1_xml_element.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="dom_8h_source.html">dom.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7c911eb06a59c864197b1a4098728e50"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a7c911eb06a59c864197b1a4098728e50"><td class="memTemplItemLeft" align="right" valign="top">String&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a7c911eb06a59c864197b1a4098728e50">getNameAs</a> () const </td></tr>
<tr class="memdesc:a7c911eb06a59c864197b1a4098728e50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the name of this XML element.  <a href="#a7c911eb06a59c864197b1a4098728e50">More...</a><br/></td></tr>
<tr class="separator:a7c911eb06a59c864197b1a4098728e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ac9d586a5668c2c64e3c06c6203b070"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a5ac9d586a5668c2c64e3c06c6203b070"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a5ac9d586a5668c2c64e3c06c6203b070">getValue</a> (T &amp;value) const </td></tr>
<tr class="memdesc:a5ac9d586a5668c2c64e3c06c6203b070"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of this element as a user type.  <a href="#a5ac9d586a5668c2c64e3c06c6203b070">More...</a><br/></td></tr>
<tr class="separator:a5ac9d586a5668c2c64e3c06c6203b070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf3a26f6199fc88cce7d9d911ba21b01"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:aaf3a26f6199fc88cce7d9d911ba21b01"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#aaf3a26f6199fc88cce7d9d911ba21b01">setValue</a> (const T &amp;value)</td></tr>
<tr class="memdesc:aaf3a26f6199fc88cce7d9d911ba21b01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the value of this element.  <a href="#aaf3a26f6199fc88cce7d9d911ba21b01">More...</a><br/></td></tr>
<tr class="separator:aaf3a26f6199fc88cce7d9d911ba21b01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af90ac6f435b03ba37cf47ee188c58887"><td class="memTemplParams" colspan="2">template&lt;class String , class T &gt; </td></tr>
<tr class="memitem:af90ac6f435b03ba37cf47ee188c58887"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#af90ac6f435b03ba37cf47ee188c58887">getAttribute</a> (const String &amp;name, T &amp;value) const </td></tr>
<tr class="memdesc:af90ac6f435b03ba37cf47ee188c58887"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve an attribute by name.  <a href="#af90ac6f435b03ba37cf47ee188c58887">More...</a><br/></td></tr>
<tr class="separator:af90ac6f435b03ba37cf47ee188c58887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a211a6f037c22a54d3facb7a8347a8421"><td class="memTemplParams" colspan="2">template&lt;class String , class T &gt; </td></tr>
<tr class="memitem:a211a6f037c22a54d3facb7a8347a8421"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a211a6f037c22a54d3facb7a8347a8421">setAttribute</a> (const String &amp;name, const T &amp;value)</td></tr>
<tr class="memdesc:a211a6f037c22a54d3facb7a8347a8421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create or update an XML attribute.  <a href="#a211a6f037c22a54d3facb7a8347a8421">More...</a><br/></td></tr>
<tr class="separator:a211a6f037c22a54d3facb7a8347a8421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9c2ce2e55294c8110825988595e3934"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:ad9c2ce2e55294c8110825988595e3934"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#ad9c2ce2e55294c8110825988595e3934">removeAttribute</a> (const String &amp;name)</td></tr>
<tr class="memdesc:ad9c2ce2e55294c8110825988595e3934"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the attribute with the given name.  <a href="#ad9c2ce2e55294c8110825988595e3934">More...</a><br/></td></tr>
<tr class="separator:ad9c2ce2e55294c8110825988595e3934"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a653caffa6fad89db7d14f67f987ad0f9"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a653caffa6fad89db7d14f67f987ad0f9"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a653caffa6fad89db7d14f67f987ad0f9">addChild</a> (const String &amp;name)</td></tr>
<tr class="memdesc:a653caffa6fad89db7d14f67f987ad0f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new child element and return a reference to it.  <a href="#a653caffa6fad89db7d14f67f987ad0f9">More...</a><br/></td></tr>
<tr class="separator:a653caffa6fad89db7d14f67f987ad0f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ab82b1720460487f4afabcd115d0c7e"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a3ab82b1720460487f4afabcd115d0c7e"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a3ab82b1720460487f4afabcd115d0c7e">getChild</a> (const String &amp;name) const </td></tr>
<tr class="memdesc:a3ab82b1720460487f4afabcd115d0c7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a child element with the given name.  <a href="#a3ab82b1720460487f4afabcd115d0c7e">More...</a><br/></td></tr>
<tr class="separator:a3ab82b1720460487f4afabcd115d0c7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d672e8ccc7592442ab927bb267af658"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a5d672e8ccc7592442ab927bb267af658"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a5d672e8ccc7592442ab927bb267af658">getChild</a> (const String &amp;name)</td></tr>
<tr class="separator:a5d672e8ccc7592442ab927bb267af658"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2640b438c4984f5eeb8760d82d73c5b8"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a2640b438c4984f5eeb8760d82d73c5b8"><td class="memTemplItemLeft" align="right" valign="top">std::pair&lt; ChildIterConst2, <br class="typebreak"/>
ChildIterConst2 &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a2640b438c4984f5eeb8760d82d73c5b8">getChildren</a> (const String &amp;name) const </td></tr>
<tr class="memdesc:a2640b438c4984f5eeb8760d82d73c5b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access all child elements with the given name via STL iterators.  <a href="#a2640b438c4984f5eeb8760d82d73c5b8">More...</a><br/></td></tr>
<tr class="separator:a2640b438c4984f5eeb8760d82d73c5b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae209dac9655bc36121abb87688ece41d"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:ae209dac9655bc36121abb87688ece41d"><td class="memTemplItemLeft" align="right" valign="top">std::pair&lt; ChildIter2, ChildIter2 &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#ae209dac9655bc36121abb87688ece41d">getChildren</a> (const String &amp;name)</td></tr>
<tr class="separator:ae209dac9655bc36121abb87688ece41d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55a6d1849490d82ae900cd9b923908f2"><td class="memItemLeft" align="right" valign="top">std::pair&lt; ChildIterConst, <br class="typebreak"/>
ChildIterConst &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a55a6d1849490d82ae900cd9b923908f2">getChildren</a> () const </td></tr>
<tr class="memdesc:a55a6d1849490d82ae900cd9b923908f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access all child elements sequentially via STL iterators.  <a href="#a55a6d1849490d82ae900cd9b923908f2">More...</a><br/></td></tr>
<tr class="separator:a55a6d1849490d82ae900cd9b923908f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac59268177d162931f937b6a7f235ad96"><td class="memItemLeft" align="right" valign="top">std::pair&lt; ChildIter, ChildIter &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#ac59268177d162931f937b6a7f235ad96">getChildren</a> ()</td></tr>
<tr class="separator:ac59268177d162931f937b6a7f235ad96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4af309f59ef09f46a559f1f0e1eac6c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4af309f59ef09f46a559f1f0e1eac6c1"></a>
<a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a4af309f59ef09f46a559f1f0e1eac6c1">parent</a> ()</td></tr>
<tr class="memdesc:a4af309f59ef09f46a559f1f0e1eac6c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get parent XML element, may be nullptr for root element. <br/></td></tr>
<tr class="separator:a4af309f59ef09f46a559f1f0e1eac6c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ba1f26be5629f89ba7648d658f7058c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ba1f26be5629f89ba7648d658f7058c"></a>
const <a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html#a7ba1f26be5629f89ba7648d658f7058c">parent</a> () const </td></tr>
<tr class="memdesc:a7ba1f26be5629f89ba7648d658f7058c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get parent XML element, may be nullptr for root element. <br/></td></tr>
<tr class="separator:a7ba1f26be5629f89ba7648d658f7058c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An XML element. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a653caffa6fad89db7d14f67f987ad0f9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a>&amp; zen::XmlElement::addChild </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new child element and return a reference to it. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ... </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the child element to be created. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af90ac6f435b03ba37cf47ee188c58887"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String , class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool zen::XmlElement::getAttribute </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve an attribute by name. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ... </td></tr>
    <tr><td class="paramname">T</td><td>String-convertible user data type: e.g. any string class, all built-in arithmetic numbers </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the attribute to retrieve. </td></tr>
    <tr><td class="paramname">value</td><td>The value of the attribute converted to T. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>"true" if value was retrieved successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="a3ab82b1720460487f4afabcd115d0c7e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classzen_1_1_xml_element.html">XmlElement</a>* zen::XmlElement::getChild </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve a child element with the given name. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ... </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the child element to be retrieved. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the child element or nullptr if none was found. </dd></dl>

</div>
</div>
<a class="anchor" id="a5d672e8ccc7592442ab927bb267af658"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a>* zen::XmlElement::getChild </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classzen_1_1_xml_element.html#a3ab82b1720460487f4afabcd115d0c7e" title="Retrieve a child element with the given name. ">getChild</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a2640b438c4984f5eeb8760d82d73c5b8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;ChildIterConst2, ChildIterConst2&gt; zen::XmlElement::getChildren </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Access all child elements with the given name via STL iterators. </p>
<div class="fragment"><div class="line"><span class="keyword">auto</span> iterPair = elem.getChildren(<span class="stringliteral">&quot;Item&quot;</span>);</div>
<div class="line">std::for_each(iterPair.first, iterPair.second,</div>
<div class="line">    [](<span class="keyword">const</span> XmlElement&amp; child) { ... });</div>
</div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the child elements to be retrieved. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair of STL begin/end iterators to access the child elements sequentially. </dd></dl>

</div>
</div>
<a class="anchor" id="ae209dac9655bc36121abb87688ece41d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;ChildIter2, ChildIter2&gt; zen::XmlElement::getChildren </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classzen_1_1_xml_element.html#a2640b438c4984f5eeb8760d82d73c5b8" title="Access all child elements with the given name via STL iterators. ">getChildren</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a55a6d1849490d82ae900cd9b923908f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;ChildIterConst, ChildIterConst&gt; zen::XmlElement::getChildren </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Access all child elements sequentially via STL iterators. </p>
<div class="fragment"><div class="line"><span class="keyword">auto</span> iterPair = elem.getChildren();</div>
<div class="line">std::for_each(iterPair.first, iterPair.second,</div>
<div class="line">    [](<span class="keyword">const</span> XmlElement&amp; child) { ... });</div>
</div><!-- fragment --> <dl class="section return"><dt>Returns</dt><dd>A pair of STL begin/end iterators to access all child elements sequentially. </dd></dl>

</div>
</div>
<a class="anchor" id="ac59268177d162931f937b6a7f235ad96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::pair&lt;ChildIter, ChildIter&gt; zen::XmlElement::getChildren </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classzen_1_1_xml_element.html#a2640b438c4984f5eeb8760d82d73c5b8" title="Access all child elements with the given name via STL iterators. ">getChildren</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7c911eb06a59c864197b1a4098728e50"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">String zen::XmlElement::getNameAs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the name of this XML element. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ... </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Name of the XML element. </dd></dl>

</div>
</div>
<a class="anchor" id="a5ac9d586a5668c2c64e3c06c6203b070"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool zen::XmlElement::getValue </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value of this element as a user type. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>Arbitrary user data type: e.g. any string class, all built-in arithmetic numbers, STL container, ... </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>"true" if Xml element was successfully converted to value, cannot fail for string-like types </dd></dl>

</div>
</div>
<a class="anchor" id="ad9c2ce2e55294c8110825988595e3934"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void zen::XmlElement::removeAttribute </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove the attribute with the given name. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ... </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a211a6f037c22a54d3facb7a8347a8421"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String , class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void zen::XmlElement::setAttribute </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create or update an XML attribute. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">String</td><td>Arbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ... </td></tr>
    <tr><td class="paramname">T</td><td>String-convertible user data type: e.g. any string-like type, all built-in arithmetic numbers </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the attribute to create or update. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aaf3a26f6199fc88cce7d9d911ba21b01"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void zen::XmlElement::setValue </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the value of this element. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>Arbitrary user data type: e.g. any string-like type, all built-in arithmetic numbers, STL container, ... </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
bgstack15