summaryrefslogtreecommitdiff
path: root/zenxml/doc/namespacezen.html
blob: 1d961e8707c4169cff2d9aa7e52d3924a42d7af9 (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
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
<!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 Namespace 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 class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&#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><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">zen Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The zen::Xml namespace.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_out.html">XmlOut</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Proxy class to conveniently convert user data into XML structure.  <a href="classzen_1_1_xml_out.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_in.html">XmlIn</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Proxy class to conveniently convert XML structure to user data.  <a href="classzen_1_1_xml_in.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_element.html">XmlElement</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">An XML element.  <a href="classzen_1_1_xml_element.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The complete XML document.  <a href="classzen_1_1_xml_doc.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structzen_1_1_xml_error.html">XmlError</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception base class for zen::Xml.  <a href="structzen_1_1_xml_error.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structzen_1_1_xml_file_error.html">XmlFileError</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception thrown due to failed file I/O.  <a href="structzen_1_1_xml_file_error.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structzen_1_1_xml_parsing_error.html">XmlParsingError</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception thrown due to an XML parsing error.  <a href="structzen_1_1_xml_parsing_error.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a872a48c0616e7f12ae8caca464835e00"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a872a48c0616e7f12ae8caca464835e00"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a872a48c0616e7f12ae8caca464835e00">load</a> (const String &amp;filename)</td></tr>
<tr class="memdesc:a872a48c0616e7f12ae8caca464835e00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load XML document from a file.  <a href="#a872a48c0616e7f12ae8caca464835e00">More...</a><br/></td></tr>
<tr class="separator:a872a48c0616e7f12ae8caca464835e00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeeb6b2318097382ae47aa939fc15d4d"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:adeeb6b2318097382ae47aa939fc15d4d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#adeeb6b2318097382ae47aa939fc15d4d">save</a> (const <a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a> &amp;doc, const String &amp;filename, const std::string &amp;lineBreak=&quot;\r\n&quot;, const std::string &amp;indent=&quot;    &quot;)</td></tr>
<tr class="memdesc:adeeb6b2318097382ae47aa939fc15d4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save XML document to a file.  <a href="#adeeb6b2318097382ae47aa939fc15d4d">More...</a><br/></td></tr>
<tr class="separator:adeeb6b2318097382ae47aa939fc15d4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bdcecfe7435ef11cedbce47d4e72ee1"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a2bdcecfe7435ef11cedbce47d4e72ee1"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a2bdcecfe7435ef11cedbce47d4e72ee1">readStruc</a> (const <a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> &amp;input, T &amp;value)</td></tr>
<tr class="memdesc:a2bdcecfe7435ef11cedbce47d4e72ee1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert XML element to structured user data.  <a href="#a2bdcecfe7435ef11cedbce47d4e72ee1">More...</a><br/></td></tr>
<tr class="separator:a2bdcecfe7435ef11cedbce47d4e72ee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29ddb823fe0a195f19a64448881b8bf6"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a29ddb823fe0a195f19a64448881b8bf6"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a29ddb823fe0a195f19a64448881b8bf6">writeStruc</a> (const T &amp;value, <a class="el" href="classzen_1_1_xml_element.html">XmlElement</a> &amp;output)</td></tr>
<tr class="memdesc:a29ddb823fe0a195f19a64448881b8bf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert structured user data into an XML element.  <a href="#a29ddb823fe0a195f19a64448881b8bf6">More...</a><br/></td></tr>
<tr class="separator:a29ddb823fe0a195f19a64448881b8bf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaf85ab94b61882f957afcd355386bff"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:acaf85ab94b61882f957afcd355386bff"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#acaf85ab94b61882f957afcd355386bff">readText</a> (const std::string &amp;input, T &amp;value)</td></tr>
<tr class="memdesc:acaf85ab94b61882f957afcd355386bff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert text to user data - used by XML elements and attributes.  <a href="#acaf85ab94b61882f957afcd355386bff">More...</a><br/></td></tr>
<tr class="separator:acaf85ab94b61882f957afcd355386bff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ce2998296871fc2f4718ceceb22a23f"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a2ce2998296871fc2f4718ceceb22a23f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a2ce2998296871fc2f4718ceceb22a23f">writeText</a> (const T &amp;value, std::string &amp;output)</td></tr>
<tr class="memdesc:a2ce2998296871fc2f4718ceceb22a23f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert user data into text - used by XML elements and attributes.  <a href="#a2ce2998296871fc2f4718ceceb22a23f">More...</a><br/></td></tr>
<tr class="separator:a2ce2998296871fc2f4718ceceb22a23f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba7bbaa14a787b07fc13da9145aabe2"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a4ba7bbaa14a787b07fc13da9145aabe2"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a4ba7bbaa14a787b07fc13da9145aabe2">saveStream</a> (const std::string &amp;stream, const String &amp;filename)</td></tr>
<tr class="memdesc:a4ba7bbaa14a787b07fc13da9145aabe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save byte stream to a file.  <a href="#a4ba7bbaa14a787b07fc13da9145aabe2">More...</a><br/></td></tr>
<tr class="separator:a4ba7bbaa14a787b07fc13da9145aabe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04fe23c3bd9b7d03309620b5ea763607"><td class="memTemplParams" colspan="2">template&lt;class String &gt; </td></tr>
<tr class="memitem:a04fe23c3bd9b7d03309620b5ea763607"><td class="memTemplItemLeft" align="right" valign="top">std::string&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacezen.html#a04fe23c3bd9b7d03309620b5ea763607">loadStream</a> (const String &amp;filename)</td></tr>
<tr class="memdesc:a04fe23c3bd9b7d03309620b5ea763607"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load byte stream from a file.  <a href="#a04fe23c3bd9b7d03309620b5ea763607">More...</a><br/></td></tr>
<tr class="separator:a04fe23c3bd9b7d03309620b5ea763607"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaa4920e275078e6c8009fbdf58b57ee"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacezen.html#afaa4920e275078e6c8009fbdf58b57ee">serialize</a> (const <a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a> &amp;doc, const std::string &amp;lineBreak=&quot;\r\n&quot;, const std::string &amp;indent=&quot;    &quot;)</td></tr>
<tr class="memdesc:afaa4920e275078e6c8009fbdf58b57ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save XML document as a byte stream.  <a href="#afaa4920e275078e6c8009fbdf58b57ee">More...</a><br/></td></tr>
<tr class="separator:afaa4920e275078e6c8009fbdf58b57ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ae1a4688d724b554fe3bf4638700477"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacezen.html#a1ae1a4688d724b554fe3bf4638700477">parse</a> (const std::string &amp;stream)</td></tr>
<tr class="memdesc:a1ae1a4688d724b554fe3bf4638700477"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load XML document from a byte stream.  <a href="#a1ae1a4688d724b554fe3bf4638700477">More...</a><br/></td></tr>
<tr class="separator:a1ae1a4688d724b554fe3bf4638700477"><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>The zen::Xml namespace. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a872a48c0616e7f12ae8caca464835e00"></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_doc.html">XmlDoc</a> zen::load </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load XML document from a file. </p>
<p>Convenience function that does nothing more than calling <a class="el" href="namespacezen.html#a04fe23c3bd9b7d03309620b5ea763607" title="Load byte stream from a file. ">loadStream()</a> and <a class="el" href="namespacezen.html#a1ae1a4688d724b554fe3bf4638700477" title="Load XML document from a byte stream. ">parse()</a>.</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">filename</td><td>Input file name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The loaded XML document </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_file_error.html" title="Exception thrown due to failed file I/O. ">XmlFileError</a></td><td></td></tr>
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_parsing_error.html" title="Exception thrown due to an XML parsing error. ">XmlParsingError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a04fe23c3bd9b7d03309620b5ea763607"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class String &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::string zen::loadStream </td>
          <td>(</td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load byte stream from a file. </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">filename</td><td>Input file name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output byte stream </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_file_error.html" title="Exception thrown due to failed file I/O. ">XmlFileError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1ae1a4688d724b554fe3bf4638700477"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classzen_1_1_xml_doc.html">XmlDoc</a> zen::parse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load XML document from a byte stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>Input byte stream </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output XML document </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_parsing_error.html" title="Exception thrown due to an XML parsing error. ">XmlParsingError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2bdcecfe7435ef11cedbce47d4e72ee1"></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::readStruc </td>
          <td>(</td>
          <td class="paramtype">const XmlElement &amp;&#160;</td>
          <td class="paramname"><em>input</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></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert XML element to structured user data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>The input XML element. </td></tr>
    <tr><td class="paramname">value</td><td>Conversion target value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>"true" if value was read successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="acaf85ab94b61882f957afcd355386bff"></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::readText </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>input</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></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert text to user data - used by XML elements and attributes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>Input text. </td></tr>
    <tr><td class="paramname">value</td><td>Conversion target value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>"true" if value was read successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="adeeb6b2318097382ae47aa939fc15d4d"></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::save </td>
          <td>(</td>
          <td class="paramtype">const XmlDoc &amp;&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>lineBreak</em> = <code>&quot;\r\n&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>indent</em> = <code>&quot;&#160;&#160;&#160;&#160;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save XML document to a file. </p>
<p>Convenience function that does nothing more than calling <a class="el" href="namespacezen.html#afaa4920e275078e6c8009fbdf58b57ee" title="Save XML document as a byte stream. ">serialize()</a> and <a class="el" href="namespacezen.html#a4ba7bbaa14a787b07fc13da9145aabe2" title="Save byte stream to a file. ">saveStream()</a>.</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">doc</td><td>The XML document to save </td></tr>
    <tr><td class="paramname">filename</td><td>Output file name </td></tr>
    <tr><td class="paramname">lineBreak</td><td>Line break, default: carriage return + new line </td></tr>
    <tr><td class="paramname">indent</td><td>Indentation, default: four space characters </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_file_error.html" title="Exception thrown due to failed file I/O. ">XmlFileError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4ba7bbaa14a787b07fc13da9145aabe2"></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::saveStream </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const String &amp;&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save byte stream to a file. </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">stream</td><td>Input byte stream </td></tr>
    <tr><td class="paramname">filename</td><td>Output file name </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="structzen_1_1_xml_file_error.html" title="Exception thrown due to failed file I/O. ">XmlFileError</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afaa4920e275078e6c8009fbdf58b57ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string zen::serialize </td>
          <td>(</td>
          <td class="paramtype">const XmlDoc &amp;&#160;</td>
          <td class="paramname"><em>doc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>lineBreak</em> = <code>&quot;\r\n&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>indent</em> = <code>&quot;&#160;&#160;&#160;&#160;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save XML document as a byte stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doc</td><td>Input XML document </td></tr>
    <tr><td class="paramname">lineBreak</td><td>Line break, default: carriage return + new line </td></tr>
    <tr><td class="paramname">indent</td><td>Indentation, default: four space characters </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Output byte stream </dd></dl>

</div>
</div>
<a class="anchor" id="a29ddb823fe0a195f19a64448881b8bf6"></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::writeStruc </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XmlElement &amp;&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert structured user data into an XML element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>The value to be converted. </td></tr>
    <tr><td class="paramname">output</td><td>The output XML element. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2ce2998296871fc2f4718ceceb22a23f"></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::writeText </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert user data into text - used by XML elements and attributes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>The value to be converted. </td></tr>
    <tr><td class="paramname">output</td><td>Output text. </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