summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-24 00:23:19 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-24 00:23:19 -0800
commit91bf70231aae8eddaccd5a6f5b0833712c471cb3 (patch)
treea707585845e64f8b1a850f03eb5e7a164cd8957e
parent5115db74091cf99054393a7132c46da544ee87e1 (diff)
docs: Regenerate HTML documentationv1.8latest
-rw-r--r--docs/manual.html376
-rw-r--r--docs/quickstart.html109
2 files changed, 297 insertions, 188 deletions
diff --git a/docs/manual.html b/docs/manual.html
index 588fc1a..daf5ac7 100644
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -4,21 +4,20 @@
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.2">
+<meta name="generator" content="Asciidoctor 1.5.5">
<meta name="author" content="website, repository">
-<title>pugixml 1.7 manual</title>
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
+<title>pugixml 1.8 manual</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
-/* Remove the comments around the @import statement below when using this as a custom stylesheet */
-/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/
+/* Remove comment around @import statement below when using as a custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
script{display:none!important}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
-body{margin:0}
a{background:transparent}
a:focus{outline:thin dotted}
a:active,a:hover{outline:0}
@@ -53,12 +52,11 @@ textarea{overflow:auto;vertical-align:top}
table{border-collapse:collapse;border-spacing:0}
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
html,body{font-size:100%}
-body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
a:hover{cursor:pointer}
img,object,embed{max-width:100%;height:auto}
object,embed{height:100%}
img{-ms-interpolation-mode:bicubic}
-#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important}
.left{float:left!important}
.right{float:right!important}
.text-left{text-align:left!important}
@@ -66,10 +64,11 @@ img{-ms-interpolation-mode:bicubic}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.hide{display:none}
-.antialiased,body{-webkit-font-smoothing:antialiased}
-img{display:inline-block;vertical-align:middle}
+img,object,svg{display:inline-block;vertical-align:middle}
textarea{height:auto;min-height:50px}
select{width:100%}
+.center{margin-left:auto;margin-right:auto}
+.spread{width:100%}
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
@@ -112,7 +111,8 @@ blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
h1{font-size:2.75em}
h2{font-size:2.3125em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
-h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
@@ -122,10 +122,14 @@ h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-s
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
.clearfix:after,.float-group:after{clear:both}
-*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
+*:not(pre)>code.nobreak{word-wrap:normal}
+*:not(pre)>code.nowrap{white-space:nowrap}
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
+em em{font-style:normal}
+strong strong{font-weight:400}
.keyseq{color:rgba(51,51,51,.8)}
-kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
.menuseq,.menu{color:rgba(0,0,0,.8)}
@@ -156,29 +160,33 @@ p a>code:hover{color:rgba(0,0,0,.9)}
#toc ul.sectlevel0>li>a{font-style:italic}
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
#toc a{text-decoration:none}
#toc a:active{text-decoration:underline}
#toctitle{color:#7a2518;font-size:1.2em}
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
-#toc.toc2 #toctitle{margin-top:0;font-size:1.2em}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
body.toc2.toc-right{padding-left:0;padding-right:15em}
-body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}
+@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
#toc.toc2{width:20em}
#toc.toc2 #toctitle{font-size:1.375em}
#toc.toc2>ul{font-size:.95em}
#toc.toc2 ul ul{padding-left:1.25em}
-body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
#content #toc>:first-child{margin-top:0}
#content #toc>:last-child{margin-bottom:0}
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
.sect1{padding-bottom:.625em}
-@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed}
+@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
+.sect1+.sect1{border-top:1px solid #efefed}
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
@@ -207,7 +215,9 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
-@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
+@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
+@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
+.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
@@ -217,7 +227,7 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
-table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0}
+table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
table.pyhltable td.code{padding-left:.75em;padding-right:0}
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
pre.pygments .lineno{display:inline-block;margin-right:.25em}
@@ -238,13 +248,12 @@ table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
.quoteblock .attribution br,.verseblock .attribution br{display:none}
-.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
table.tableblock{max-width:100%;border-collapse:separate}
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
-table.spread{width:100%}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0}
table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0}
@@ -290,8 +299,8 @@ ol.upperroman{list-style-type:upper-roman}
ol.lowergreek{list-style-type:lower-greek}
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
-td.hdlist1{padding-right:.75em;font-weight:bold}
-td.hdlist1,td.hdlist2{vertical-align:top}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1}
.colist>table tr>td:last-of-type{padding:.25em 0}
@@ -304,13 +313,14 @@ td.hdlist1,td.hdlist2{vertical-align:top}
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
.image.left{margin-right:.625em}
.image.right{margin-left:.625em}
-a.image{text-decoration:none}
-span.footnote,span.footnoteref{vertical-align:super;font-size:.875em}
-span.footnote a,span.footnoteref a{text-decoration:none}
-span.footnote a:active,span.footnoteref a:active{text-decoration:underline}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
-#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em}
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
@@ -368,11 +378,10 @@ span.icon>.fa{cursor:default}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
-h1,h2{letter-spacing:-.01em}
-dt,th.tableblock,td.content{text-rendering:optimizeLegibility}
-p,td.content{letter-spacing:-.01em}
-p strong,td.content strong{letter-spacing:-.005em}
-p,blockquote,dt,td.content{font-size:1.0625rem}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
@@ -383,9 +392,9 @@ a{color:inherit!important;text-decoration:underline!important}
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]:after{content:" (" attr(title) ")"}
-pre,blockquote,tr,img{page-break-inside:avoid}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
thead{display:table-header-group}
-img{max-width:100%!important}
+svg{max-width:100%}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
@@ -411,7 +420,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</style>
<style>
.listingblock .pygments .hll { background-color: #ffffcc }
-.listingblock .pygments { background: #f8f8f8; }
+.listingblock .pygments, .listingblock .pygments code { background: #f8f8f8; }
.listingblock .pygments .tok-c { color: #408080; font-style: italic } /* Comment */
.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */
.listingblock .pygments .tok-k { color: #008000; font-weight: bold } /* Keyword */
@@ -477,7 +486,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</head>
<body class="article toc2 toc-right">
<div id="header">
-<h1>pugixml 1.7 manual</h1>
+<h1>pugixml 1.8 manual</h1>
<div class="details">
<span id="author" class="author">website</span><br>
<span id="email" class="email"><a href="http://pugixml.org" class="bare">http://pugixml.org</a></span><br>
@@ -572,6 +581,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</li>
<li><a href="#changes">9. Changelog</a>
<ul class="sectlevel2">
+<li><a href="#v1.8">v1.8 <sup>2016-11-24</sup></a></li>
<li><a href="#v1.7">v1.7 <sup>2015-10-19</sup></a></li>
<li><a href="#v1.6">v1.6 <sup>2015-04-10</sup></a></li>
<li><a href="#v1.5">v1.5 <sup>2014-11-27</sup></a></li>
@@ -604,10 +614,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
<div id="content">
<div class="sect1">
-<h2 id="overview"><a class="anchor" href="#overview"></a>1. Overview</h2>
+<h2 id="overview"><a class="anchor" href="#overview"></a><a class="link" href="#overview">1. Overview</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="overview.introduction"><a class="anchor" href="#overview.introduction"></a>1.1. Introduction</h3>
+<h3 id="overview.introduction"><a class="anchor" href="#overview.introduction"></a><a class="link" href="#overview.introduction">1.1. Introduction</a></h3>
<div class="paragraph">
<p><a href="http://pugixml.org/">pugixml</a> is a light-weight C&#43;&#43; XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an <a href="#xpath">XPath 1.0 implementation</a> for complex data-driven tree queries. Full Unicode support is also available, with <a href="#dom.unicode">two Unicode interface variants</a> and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is <a href="#install.portability">extremely portable</a> and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <a href="#overview.license">MIT license</a>, making it completely free to use in both open-source and proprietary applications.</p>
</div>
@@ -631,7 +641,7 @@ No documentation is perfect; neither is this one. If you find errors or omission
</div>
</div>
<div class="sect2">
-<h3 id="overview.feedback"><a class="anchor" href="#overview.feedback"></a>1.2. Feedback</h3>
+<h3 id="overview.feedback"><a class="anchor" href="#overview.feedback"></a><a class="link" href="#overview.feedback">1.2. Feedback</a></h3>
<div class="paragraph">
<p>If you believe you&#8217;ve found a bug in pugixml (bugs include compilation problems (errors/warnings), crashes, performance degradation and incorrect behavior), please file an issue via <a href="https://github.com/zeux/pugixml/issues/new">issue submission form</a>. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc.</p>
</div>
@@ -646,7 +656,7 @@ No documentation is perfect; neither is this one. If you find errors or omission
</div>
</div>
<div class="sect2">
-<h3 id="overview.thanks"><a class="anchor" href="#overview.thanks"></a>1.3. Acknowledgments</h3>
+<h3 id="overview.thanks"><a class="anchor" href="#overview.thanks"></a><a class="link" href="#overview.thanks">1.3. Acknowledgments</a></h3>
<div class="paragraph">
<p>pugixml could not be developed without the help from many people; some of them are listed in this section. If you&#8217;ve played a part in pugixml development and you can not find yourself on this list, I&#8217;m truly sorry; please <a href="#email">send me an e-mail</a> so I can fix this.</p>
</div>
@@ -664,7 +674,7 @@ No documentation is perfect; neither is this one. If you find errors or omission
</div>
</div>
<div class="sect2">
-<h3 id="overview.license"><a class="anchor" href="#overview.license"></a>1.4. License</h3>
+<h3 id="overview.license"><a class="anchor" href="#overview.license"></a><a class="link" href="#overview.license">1.4. License</a></h3>
<div class="paragraph">
<p>The pugixml library is distributed under the MIT license:</p>
</div>
@@ -707,22 +717,22 @@ pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
</div>
</div>
<div class="sect1">
-<h2 id="install"><a class="anchor" href="#install"></a>2. Installation</h2>
+<h2 id="install"><a class="anchor" href="#install"></a><a class="link" href="#install">2. Installation</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="install.getting"><a class="anchor" href="#install.getting"></a>2.1. Getting pugixml</h3>
+<h3 id="install.getting"><a class="anchor" href="#install.getting"></a><a class="link" href="#install.getting">2.1. Getting pugixml</a></h3>
<div class="paragraph">
<p>pugixml is distributed in source form. You can either download a source distribution or clone the Git repository.</p>
</div>
<div class="sect3">
-<h4 id="install.getting.source"><a class="anchor" href="#install.getting.source"></a>2.1.1. Source distributions</h4>
+<h4 id="install.getting.source"><a class="anchor" href="#install.getting.source"></a><a class="link" href="#install.getting.source">2.1.1. Source distributions</a></h4>
<div class="paragraph">
<p>You can download the latest source distribution as an archive:</p>
</div>
<div class="paragraph">
-<p><a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.zip">pugixml-1.7.zip</a> (Windows line endings)
+<p><a href="https://github.com/zeux/pugixml/releases/download/v1.8/pugixml-1.8.zip">pugixml-1.8.zip</a> (Windows line endings)
/
-<a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.tar.gz">pugixml-1.7.tar.gz</a> (Unix line endings)</p>
+<a href="https://github.com/zeux/pugixml/releases/download/v1.8/pugixml-1.8.tar.gz">pugixml-1.8.tar.gz</a> (Unix line endings)</p>
</div>
<div class="paragraph">
<p>The distribution contains library source, documentation (the manual you&#8217;re reading now and the quick start guide) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.</p>
@@ -732,7 +742,7 @@ pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
</div>
</div>
<div class="sect3">
-<h4 id="install.getting.git"><a class="anchor" href="#install.getting.git"></a>2.1.2. Git repository</h4>
+<h4 id="install.getting.git"><a class="anchor" href="#install.getting.git"></a><a class="link" href="#install.getting.git">2.1.2. Git repository</a></h4>
<div class="paragraph">
<p>The Git repository is located at <a href="https://github.com/zeux/pugixml/" class="bare">https://github.com/zeux/pugixml/</a>. There is a Git tag "v{version}" for each version; also there is the "latest" tag, which always points to the latest stable release.</p>
</div>
@@ -743,7 +753,7 @@ pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
<div class="content">
<pre class="pygments highlight"><code data-lang="bash">git clone https://github.com/zeux/pugixml
cd pugixml
-git checkout v1.7</code></pre>
+git checkout v1.8</code></pre>
</div>
</div>
<div class="paragraph">
@@ -754,18 +764,18 @@ git checkout v1.7</code></pre>
</div>
</div>
<div class="sect3">
-<h4 id="install.getting.subversion"><a class="anchor" href="#install.getting.subversion"></a>2.1.3. Subversion repository</h4>
+<h4 id="install.getting.subversion"><a class="anchor" href="#install.getting.subversion"></a><a class="link" href="#install.getting.subversion">2.1.3. Subversion repository</a></h4>
<div class="paragraph">
<p>You can access the Git repository via Subversion using <a href="https://github.com/zeux/pugixml" class="bare">https://github.com/zeux/pugixml</a> URL. For example, to checkout the current version, you can use this command:</p>
</div>
<div class="listingblock">
<div class="content">
-<pre class="pygments highlight"><code data-lang="bash">svn checkout https://github.com/zeux/pugixml/tags/v1.7 pugixml</code></pre>
+<pre class="pygments highlight"><code data-lang="bash">svn checkout https://github.com/zeux/pugixml/tags/v1.8 pugixml</code></pre>
</div>
</div>
</div>
<div class="sect3">
-<h4 id="install.getting.packages"><a class="anchor" href="#install.getting.packages"></a>2.1.4. Packages</h4>
+<h4 id="install.getting.packages"><a class="anchor" href="#install.getting.packages"></a><a class="link" href="#install.getting.packages">2.1.4. Packages</a></h4>
<div class="paragraph">
<p>pugixml is available as a package via various package managers. Note that most packages are maintained separately from the main repository so they do not necessarily contain the latest version.</p>
</div>
@@ -791,7 +801,7 @@ git checkout v1.7</code></pre>
</div>
</div>
<div class="sect2">
-<h3 id="install.building"><a class="anchor" href="#install.building"></a>2.2. Building pugixml</h3>
+<h3 id="install.building"><a class="anchor" href="#install.building"></a><a class="link" href="#install.building">2.2. Building pugixml</a></h3>
<div class="paragraph">
<p>pugixml is distributed in source form without any pre-built binaries; you have to build them yourself.</p>
</div>
@@ -799,9 +809,9 @@ git checkout v1.7</code></pre>
<p>The complete pugixml source consists of three files - one source file, <code>pugixml.cpp</code>, and two header files, <code>pugixml.hpp</code> and <code>pugiconfig.hpp</code>. <code>pugixml.hpp</code> is the primary header which you need to include in order to use pugixml classes/functions; <code>pugiconfig.hpp</code> is a supplementary configuration file (see <a href="#install.building.config">Additional configuration options</a>). The rest of this guide assumes that <code>pugixml.hpp</code> is either in the current directory or in one of include directories of your projects, so that <code>#include "pugixml.hpp"</code> can find the header; however you can also use relative path (i.e. <code>#include "../libs/pugixml/src/pugixml.hpp"</code>) or include directory-relative path (i.e. <code>#include &lt;xml/thirdparty/pugixml/src/pugixml.hpp&gt;</code>).</p>
</div>
<div class="sect3">
-<h4 id="install.building.embed"><a class="anchor" href="#install.building.embed"></a>2.2.1. Building pugixml as a part of another static library/executable</h4>
+<h4 id="install.building.embed"><a class="anchor" href="#install.building.embed"></a><a class="link" href="#install.building.embed">2.2.1. Building pugixml as a part of another static library/executable</a></h4>
<div class="paragraph">
-<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you&#8217;re using Microsoft Visual Studio <span class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</span>, Apple Xcode, Code::Blocks or any other IDE, just add <code>pugixml.cpp</code> to one of your projects.</p>
+<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you&#8217;re using Microsoft Visual Studio <sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</sup>, Apple Xcode, Code::Blocks or any other IDE, just add <code>pugixml.cpp</code> to one of your projects.</p>
</div>
<div class="paragraph">
<p>If you&#8217;re using Microsoft Visual Studio and the project has precompiled headers turned on, you&#8217;ll see the following error messages:</p>
@@ -848,7 +858,7 @@ git checkout v1.7</code></pre>
</table>
</div>
<div class="sect3">
-<h4 id="install.building.static"><a class="anchor" href="#install.building.static"></a>2.2.2. Building pugixml as a standalone static library</h4>
+<h4 id="install.building.static"><a class="anchor" href="#install.building.static"></a><a class="link" href="#install.building.static">2.2.2. Building pugixml as a standalone static library</a></h4>
<div class="paragraph">
<p>It&#8217;s possible to compile pugixml as a standalone static library. This process depends on the method of building your application; pugixml distribution comes with project files for several popular IDEs/build systems. There are project files for Apple XCode, Code::Blocks, Codelite, Microsoft Visual Studio 2005, 2008, 2010+, and configuration scripts for CMake and premake4. You&#8217;re welcome to submit project files/build scripts for other software; see <a href="#overview.feedback">Feedback</a>.</p>
</div>
@@ -898,7 +908,7 @@ git checkout v1.7</code></pre>
</table>
</div>
<div class="sect3">
-<h4 id="install.building.shared"><a class="anchor" href="#install.building.shared"></a>2.2.3. Building pugixml as a standalone shared library</h4>
+<h4 id="install.building.shared"><a class="anchor" href="#install.building.shared"></a><a class="link" href="#install.building.shared">2.2.3. Building pugixml as a standalone shared library</a></h4>
<div class="paragraph">
<p>It&#8217;s possible to compile pugixml as a standalone shared library. The process is usually similar to the static library approach; however, no preconfigured projects/scripts are included into pugixml distribution, so you&#8217;ll have to do it yourself. Generally, if you&#8217;re using GCC-based toolchain, the process does not differ from building any other library as DLL (adding -shared to compilation flags should suffice); if you&#8217;re using MSVC-based toolchain, you&#8217;ll have to explicitly mark exported symbols with a declspec attribute. You can do it by defining <a href="#PUGIXML_API">PUGIXML_API</a> macro, i.e. via <code>pugiconfig.hpp</code>:</p>
</div>
@@ -925,7 +935,7 @@ If you&#8217;re using STL-related functions, you should use the shared runtime l
</div>
</div>
<div class="sect3">
-<h4 id="install.building.header"><a class="anchor" href="#install.building.header"></a>2.2.4. Using pugixml in header-only mode</h4>
+<h4 id="install.building.header"><a class="anchor" href="#install.building.header"></a><a class="link" href="#install.building.header">2.2.4. Using pugixml in header-only mode</a></h4>
<div id="PUGIXML_HEADER_ONLY" class="paragraph">
<p>It&#8217;s possible to use pugixml in header-only mode. This means that all source code for pugixml will be included in every translation unit that includes <code>pugixml.hpp</code>. This is how most of Boost and STL libraries work.</p>
</div>
@@ -948,7 +958,7 @@ can include pugixml.cpp in your project (see <a href="#install.building.embed">B
</div>
</div>
<div class="sect3">
-<h4 id="install.building.config"><a class="anchor" href="#install.building.config"></a>2.2.5. Additional configuration options</h4>
+<h4 id="install.building.config"><a class="anchor" href="#install.building.config"></a><a class="link" href="#install.building.config">2.2.5. Additional configuration options</a></h4>
<div class="paragraph">
<p>pugixml uses several defines to control the compilation process. There are two ways to define them: either put the needed definitions to <code>pugiconfig.hpp</code> (it has some examples that are commented out) or provide them via compiler command-line. Consistency is important: the definitions should match in all source files that include <code>pugixml.hpp</code> (including pugixml sources) throughout the application. Adding defines to <code>pugiconfig.hpp</code> lets you guarantee this, unless your macro definition is wrapped in preprocessor <code>#if</code>/<code>#ifdef</code> directive and this directive is not consistent. <code>pugiconfig.hpp</code> will never contain anything but comments, which means that when upgrading to a new version, you can safely leave your modified version intact.</p>
</div>
@@ -991,7 +1001,7 @@ In that example <code>PUGIXML_API</code> is inconsistent between several source
</div>
</div>
<div class="sect2">
-<h3 id="install.portability"><a class="anchor" href="#install.portability"></a>2.3. Portability</h3>
+<h3 id="install.portability"><a class="anchor" href="#install.portability"></a><a class="link" href="#install.portability">2.3. Portability</a></h3>
<div class="paragraph">
<p>pugixml is written in standard-compliant C&#43;&#43; with some compiler-specific workarounds where appropriate. pugixml is compatible with the C&#43;&#43;11 standard, but does not require C&#43;&#43;11 support. Each version is tested with a unit test suite with code coverage exceeding 99%.</p>
</div>
@@ -1011,13 +1021,13 @@ In that example <code>PUGIXML_API</code> is inconsistent between several source
</div>
</div>
<div class="sect1">
-<h2 id="dom"><a class="anchor" href="#dom"></a>3. Document object model</h2>
+<h2 id="dom"><a class="anchor" href="#dom"></a><a class="link" href="#dom">3. Document object model</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from a character stream (file, string, C&#43;&#43; I/O stream), then traversed with the special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C&#43;&#43; I/O stream or custom transport).</p>
</div>
<div class="sect2">
-<h3 id="dom.tree"><a class="anchor" href="#dom.tree"></a>3.1. Tree structure</h3>
+<h3 id="dom.tree"><a class="anchor" href="#dom.tree"></a><a class="link" href="#dom.tree">3.1. Tree structure</a></h3>
<div class="paragraph">
<p>The XML document is represented with a tree data structure. The root of the tree is the document itself, which corresponds to C&#43;&#43; type <a href="#xml_document">xml_document</a>. Document has one or more child nodes, which correspond to C&#43;&#43; type <a href="#xml_node">xml_node</a>. Nodes have different types; depending on a type, a node can have a collection of child nodes, a collection of attributes, which correspond to C&#43;&#43; type <a href="#xml_attribute">xml_attribute</a>, and some additional data (i.e. name).</p>
</div>
@@ -1144,7 +1154,7 @@ In that example <code>PUGIXML_API</code> is inconsistent between several source
</table>
</div>
<div class="sect2">
-<h3 id="dom.cpp"><a class="anchor" href="#dom.cpp"></a>3.2. C&#43;&#43; interface</h3>
+<h3 id="dom.cpp"><a class="anchor" href="#dom.cpp"></a><a class="link" href="#dom.cpp">3.2. C&#43;&#43; interface</a></h3>
<div class="admonitionblock note">
<table>
<tr>
@@ -1217,7 +1227,7 @@ Finally handles can be implicitly cast to boolean-like objects, so that you can
</div>
</div>
<div class="sect2">
-<h3 id="dom.unicode"><a class="anchor" href="#dom.unicode"></a>3.3. Unicode interface</h3>
+<h3 id="dom.unicode"><a class="anchor" href="#dom.unicode"></a><a class="link" href="#dom.unicode">3.3. Unicode interface</a></h3>
<div class="paragraph">
<p>There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via <a href="#PUGIXML_WCHAR_MODE">PUGIXML_WCHAR_MODE</a> define; you can set it via <code>pugiconfig.hpp</code> or via preprocessor options, as discussed in <a href="#install.building.config">Additional configuration options</a>. If this define is set, the wchar_t interface is used; otherwise (by default) the char interface is used. The exact wide character encoding is assumed to be either UTF-16 or UTF-32 and is determined based on the size of <code>wchar_t</code> type.</p>
</div>
@@ -1302,7 +1312,7 @@ There are cases when you&#8217;ll have to convert string data between UTF-8 and
</div>
</div>
<div class="sect2">
-<h3 id="dom.thread"><a class="anchor" href="#dom.thread"></a>3.4. Thread-safety guarantees</h3>
+<h3 id="dom.thread"><a class="anchor" href="#dom.thread"></a><a class="link" href="#dom.thread">3.4. Thread-safety guarantees</a></h3>
<div class="paragraph">
<p>Almost all functions in pugixml have the following thread-safety guarantees:</p>
</div>
@@ -1327,7 +1337,7 @@ There are cases when you&#8217;ll have to convert string data between UTF-8 and
</div>
</div>
<div class="sect2">
-<h3 id="dom.exception"><a class="anchor" href="#dom.exception"></a>3.5. Exception guarantees</h3>
+<h3 id="dom.exception"><a class="anchor" href="#dom.exception"></a><a class="link" href="#dom.exception">3.5. Exception guarantees</a></h3>
<div class="paragraph">
<p>With the exception of XPath, pugixml itself does not throw any exceptions. Additionally, most pugixml functions have a no-throw exception guarantee.</p>
</div>
@@ -1339,12 +1349,12 @@ There are cases when you&#8217;ll have to convert string data between UTF-8 and
</div>
</div>
<div class="sect2">
-<h3 id="dom.memory"><a class="anchor" href="#dom.memory"></a>3.6. Memory management</h3>
+<h3 id="dom.memory"><a class="anchor" href="#dom.memory"></a><a class="link" href="#dom.memory">3.6. Memory management</a></h3>
<div class="paragraph">
<p>pugixml requests the memory needed for document storage in big chunks, and allocates document data inside those chunks. This section discusses replacing functions used for chunk allocation and internal memory management implementation.</p>
</div>
<div class="sect3">
-<h4 id="dom.memory.custom"><a class="anchor" href="#dom.memory.custom"></a>3.6.1. Custom memory allocation/deallocation functions</h4>
+<h4 id="dom.memory.custom"><a class="anchor" href="#dom.memory.custom"></a><a class="link" href="#dom.memory.custom">3.6.1. Custom memory allocation/deallocation functions</a></h4>
<div class="paragraph">
<p><a id="allocation_function"></a><a id="deallocation_function"></a>
All memory for tree structure, tree data and XPath objects is allocated via globally specified functions, which default to malloc/free. You can set your own allocation functions with set_memory_management function. The function interfaces are the same as that of malloc/free:</p>
@@ -1398,7 +1408,7 @@ You can use the following accessor functions to change or get current memory man
</div>
</div>
<div class="sect3">
-<h4 id="dom.memory.tuning"><a class="anchor" href="#dom.memory.tuning"></a>3.6.2. Memory consumption tuning</h4>
+<h4 id="dom.memory.tuning"><a class="anchor" href="#dom.memory.tuning"></a><a class="link" href="#dom.memory.tuning">3.6.2. Memory consumption tuning</a></h4>
<div class="paragraph">
<p>There are several important buffering optimizations in pugixml that rely on predefined constants. These constants have default values that were tuned for common usage patterns; for some applications, changing these constants might improve memory consumption or increase performance. Changing these constants is not recommended unless their default values result in visible problems.</p>
</div>
@@ -1420,7 +1430,7 @@ You can use the following accessor functions to change or get current memory man
</div>
</div>
<div class="sect3">
-<h4 id="dom.memory.internals"><a class="anchor" href="#dom.memory.internals"></a>3.6.3. Document memory management internals</h4>
+<h4 id="dom.memory.internals"><a class="anchor" href="#dom.memory.internals"></a><a class="link" href="#dom.memory.internals">3.6.3. Document memory management internals</a></h4>
<div class="paragraph">
<p>Constructing a document object using the default constructor does not result in any allocations; document node is stored inside the <a href="#xml_document">xml_document</a> object.</p>
</div>
@@ -1432,7 +1442,7 @@ You can use the following accessor functions to change or get current memory man
</div>
</div>
<div class="sect3">
-<h4 id="dom.memory.compact"><a class="anchor" href="#dom.memory.compact"></a>3.6.4. Compact mode</h4>
+<h4 id="dom.memory.compact"><a class="anchor" href="#dom.memory.compact"></a><a class="link" href="#dom.memory.compact">3.6.4. Compact mode</a></h4>
<div class="paragraph">
<p>By default nodes and attributes are optimized for efficiency of access. This can cause them to take a significant amount of memory - for documents with a lot of nodes and not a lot of contents (short attribute values/node text), and depending on the pointer size, the document structure can take noticeably more memory than the document itself (e.g. on a 64-bit platform in UTF-8 mode a markup-heavy document with the file size of 2.1 Mb can use 2.1 Mb for document buffer and 8.3 Mb for document structure).</p>
</div>
@@ -1450,7 +1460,7 @@ You can use the following accessor functions to change or get current memory man
</div>
</div>
<div class="sect1">
-<h2 id="loading"><a class="anchor" href="#loading"></a>4. Loading document</h2>
+<h2 id="loading"><a class="anchor" href="#loading"></a><a class="link" href="#loading">4. Loading document</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml provides several functions for loading XML data from various places - files, C&#43;&#43; iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed for performance reasons. Also some XML transformations (i.e. EOL handling or attribute value normalization) can impact parsing speed and thus can be disabled. However for vast majority of XML documents there is no performance difference between different parsing options. Parsing options also control whether certain XML nodes are parsed; see <a href="#loading.options">Parsing options</a> for more information.</p>
@@ -1459,7 +1469,7 @@ You can use the following accessor functions to change or get current memory man
<p>XML data is always converted to internal character format (see <a href="#dom.unicode">Unicode interface</a>) before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it&#8217;s a strict subset of UTF-16) and handles all encoding conversions automatically. Unless explicit encoding is specified, loading functions perform automatic encoding detection based on first few characters of XML data, so in almost all cases you do not have to specify document encoding. Encoding conversion is described in more detail in <a href="#loading.encoding">Encodings</a>.</p>
</div>
<div class="sect2">
-<h3 id="loading.file"><a class="anchor" href="#loading.file"></a>4.1. Loading document from file</h3>
+<h3 id="loading.file"><a class="anchor" href="#loading.file"></a><a class="link" href="#loading.file">4.1. Loading document from file</a></h3>
<div class="paragraph">
<p><a id="xml_document::load_file"></a><a id="xml_document::load_file_wide"></a>
The most common source of XML data is files; pugixml provides dedicated functions for loading an XML document from file:</p>
@@ -1493,7 +1503,7 @@ The most common source of XML data is files; pugixml provides dedicated function
</div>
</div>
<div class="sect2">
-<h3 id="loading.memory"><a class="anchor" href="#loading.memory"></a>4.2. Loading document from memory</h3>
+<h3 id="loading.memory"><a class="anchor" href="#loading.memory"></a><a class="link" href="#loading.memory">4.2. Loading document from memory</a></h3>
<div class="paragraph">
<p><a id="xml_document::load_buffer"></a><a id="xml_document::load_buffer_inplace"></a><a id="xml_document::load_buffer_inplace_own"></a>
Sometimes XML data should be loaded from some other source than a file, i.e. HTTP URL; also you may want to load XML data from file using non-standard functions, i.e. to use your virtual file system facilities or to load XML from GZip-compressed files. All these scenarios require loading document from memory. First you should prepare a contiguous memory block with all XML data; then you have to invoke one of buffer loading functions. These functions will handle the necessary encoding conversions, if any, and then will parse the data into the corresponding XML tree. There are several buffer loading functions, which differ in the behavior and thus in performance/memory usage:</p>
@@ -1572,7 +1582,7 @@ Sometimes XML data should be loaded from some other source than a file, i.e. HTT
</div>
</div>
<div class="sect2">
-<h3 id="loading.stream"><a class="anchor" href="#loading.stream"></a>4.3. Loading document from C&#43;&#43; IOstreams</h3>
+<h3 id="loading.stream"><a class="anchor" href="#loading.stream"></a><a class="link" href="#loading.stream">4.3. Loading document from C&#43;&#43; IOstreams</a></h3>
<div id="xml_document::load_stream" class="paragraph">
<p>To enhance interoperability, pugixml provides functions for loading document from any object which implements C&#43;&#43; <code>std::istream</code> interface. This allows you to load documents from any standard C&#43;&#43; stream (i.e. file stream) or any third-party compliant implementation (i.e. Boost Iostreams). There are two functions, one works with narrow character streams, another handles wide character ones:</p>
</div>
@@ -1599,7 +1609,7 @@ Sometimes XML data should be loaded from some other source than a file, i.e. HTT
</div>
</div>
<div class="sect2">
-<h3 id="loading.errors"><a class="anchor" href="#loading.errors"></a>4.4. Handling parsing errors</h3>
+<h3 id="loading.errors"><a class="anchor" href="#loading.errors"></a><a class="link" href="#loading.errors">4.4. Handling parsing errors</a></h3>
<div id="xml_parse_result" class="paragraph">
<p>All document loading functions return the parsing result via <code>xml_parse_result</code> object. It contains parsing status, the offset of last successfully parsed character from the beginning of the source stream, and the encoding of the source stream:</p>
</div>
@@ -1712,7 +1722,7 @@ Offset is calculated in the XML buffer in native encoding; if encoding conversio
</div>
</div>
<div class="sect2">
-<h3 id="loading.options"><a class="anchor" href="#loading.options"></a>4.5. Parsing options</h3>
+<h3 id="loading.options"><a class="anchor" href="#loading.options"></a><a class="link" href="#loading.options">4.5. Parsing options</a></h3>
<div class="paragraph">
<p>All document loading functions accept the optional parameter <code>options</code>. This is a bitmask that customizes the parsing process: you can select the node types that are parsed and various transformations that are performed with the XML text. Disabling certain transformations can improve parsing performance for some documents; however, the code for all transformations is very well optimized, and thus the majority of documents won&#8217;t get any performance benefit. As a rule of thumb, only modify parsing flags if you want to get some nodes in the document that are excluded by default (i.e. declaration or comment nodes).</p>
</div>
@@ -1758,6 +1768,10 @@ You should use the usual bitwise arithmetics to manipulate the bitmask: to enabl
<p><a id="parse_ws_pcdata_single"></a><code>parse_ws_pcdata_single</code> determines if whitespace-only PCDATA nodes that have no sibling nodes are to be put in DOM tree. In some cases application needs to parse the whitespace-only contents of nodes, i.e. <code>&lt;node&gt; &lt;/node&gt;</code>, but is not interested in whitespace markup elsewhere. It is possible to use <a href="#parse_ws_pcdata">parse_ws_pcdata</a> flag in this case, but it results in excessive allocations and complicates document processing; this flag can be used to avoid that. As an example, after parsing XML string <code>&lt;node&gt; &lt;a&gt; &lt;/a&gt; &lt;/node&gt;</code> with <code>parse_ws_pcdata_single</code> flag set, <code>&lt;node&gt;</code> element will have one child <code>&lt;a&gt;</code>, and <code>&lt;a&gt;</code> element will have one child with type <a href="#node_pcdata">node_pcdata</a> and value <code>" "</code>. This flag has no effect if <a href="#parse_ws_pcdata">parse_ws_pcdata</a> is enabled. This flag is <strong>off</strong> by default.</p>
</li>
<li>
+<p><a id="parse_embed_pcdata"></a><code>parse_embed_pcdata</code> determines if PCDATA contents is to be saved as element values. Normally element nodes have names but not values; this flag forces the parser to store the contents as a value if PCDATA is the first child of the element node (otherwise PCDATA node is created as usual). This can significantly reduce the memory required for documents with many PCDATA nodes. To retrieve the data you can use <code>xml_node::value()</code> on the element nodes or any of the higher-level functions like <code>child_value</code> or <code>text</code>. This flag is <strong>off</strong> by default.
+Since this flag significantly changes the DOM structure it is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. This flag is <strong>off</strong> by default.</p>
+</li>
+<li>
<p><a id="parse_fragment"></a><code>parse_fragment</code> determines if document should be treated as a fragment of a valid XML. Parsing document as a fragment leads to top-level PCDATA content (i.e. text that is not located inside a node) to be added to a tree, and additionally treats documents without element nodes as valid. This flag is <strong>off</strong> by default.</p>
</li>
</ul>
@@ -1847,7 +1861,7 @@ Using in-place parsing (<a href="#xml_document::load_buffer_inplace">load_buffer
</div>
</div>
<div class="sect2">
-<h3 id="loading.encoding"><a class="anchor" href="#loading.encoding"></a>4.6. Encodings</h3>
+<h3 id="loading.encoding"><a class="anchor" href="#loading.encoding"></a><a class="link" href="#loading.encoding">4.6. Encodings</a></h3>
<div id="xml_encoding" class="paragraph">
<p>pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it&#8217;s a strict subset of UTF-16) and handles all encoding conversions. Most loading functions accept the optional parameter <code>encoding</code>. This is a value of enumeration type <code>xml_encoding</code>, that can have the following values:</p>
</div>
@@ -1927,7 +1941,7 @@ The current behavior for Unicode conversion is to skip all invalid UTF sequences
</div>
</div>
<div class="sect2">
-<h3 id="loading.w3c"><a class="anchor" href="#loading.w3c"></a>4.7. Conformance to W3C specification</h3>
+<h3 id="loading.w3c"><a class="anchor" href="#loading.w3c"></a><a class="link" href="#loading.w3c">4.7. Conformance to W3C specification</a></h3>
<div class="paragraph">
<p>pugixml is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons.</p>
</div>
@@ -1966,13 +1980,13 @@ The current behavior for Unicode conversion is to skip all invalid UTF sequences
</div>
</div>
<div class="sect1">
-<h2 id="access"><a class="anchor" href="#access"></a>5. Accessing document data</h2>
+<h2 id="access"><a class="anchor" href="#access"></a><a class="link" href="#access">5. Accessing document data</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml features an extensive interface for getting various types of data from the document and for traversing the document. This section provides documentation for all such functions that do not modify the tree except for XPath-related functions; see <a href="#xpath">XPath</a> for XPath reference. As discussed in <a href="#dom.cpp">C&#43;&#43; interface</a>, there are two types of handles to tree data - <a href="#xml_node">xml_node</a> and <a href="#xml_attribute">xml_attribute</a>. The handles have special null (empty) values which propagate through various functions and thus are useful for writing more concise code; see <a href="#node_null">this description</a> for details. The documentation in this section will explicitly state the results of all function in case of null inputs.</p>
</div>
<div class="sect2">
-<h3 id="access.basic"><a class="anchor" href="#access.basic"></a>5.1. Basic traversal functions</h3>
+<h3 id="access.basic"><a class="anchor" href="#access.basic"></a><a class="link" href="#access.basic">5.1. Basic traversal functions</a></h3>
<div class="paragraph">
<p><a id="xml_node::parent"></a><a id="xml_node::first_child"></a><a id="xml_node::last_child"></a><a id="xml_node::next_sibling"></a><a id="xml_node::previous_sibling"></a><a id="xml_node::first_attribute"></a><a id="xml_node::last_attribute"></a><a id="xml_attribute::next_attribute"></a><a id="xml_attribute::previous_attribute"></a>
The internal representation of the document is a tree, where each node has a list of child nodes (the order of children corresponds to their order in the XML representation), and additionally element nodes have a list of attributes, which is also ordered. Several functions are provided in order to let you get from one node in the tree to the other. These functions roughly correspond to the internal representation, and thus are usually building blocks for other methods of traversing (i.e. XPath traversals are based on these functions).</p>
@@ -2029,7 +2043,7 @@ Because of memory consumption reasons, attributes do not have a link to their pa
</div>
</div>
<div class="sect2">
-<h3 id="access.nodedata"><a class="anchor" href="#access.nodedata"></a>5.2. Getting node data</h3>
+<h3 id="access.nodedata"><a class="anchor" href="#access.nodedata"></a><a class="link" href="#access.nodedata">5.2. Getting node data</a></h3>
<div class="paragraph">
<p><a id="xml_node::name"></a><a id="xml_node::value"></a>
Apart from structural information (parent, child nodes, attributes), nodes can have name and value, both of which are strings. Depending on node type, name or value may be absent. <a href="#node_document">node_document</a> nodes do not have a name or value, <a href="#node_element">node_element</a> and <a href="#node_declaration">node_declaration</a> nodes always have a name but never have a value, <a href="#node_pcdata">node_pcdata</a>, <a href="#node_cdata">node_cdata</a>, <a href="#node_comment">node_comment</a> and <a href="#node_doctype">node_doctype</a> nodes never have a name but always have a value (it may be empty though), <a href="#node_pi">node_pi</a> nodes always have a name and a value (again, value may be empty). In order to get node&#8217;s name or value, you can use the following functions:</p>
@@ -2064,7 +2078,7 @@ Apart from structural information (parent, child nodes, attributes), nodes can h
</div>
</div>
<div class="sect2">
-<h3 id="access.attrdata"><a class="anchor" href="#access.attrdata"></a>5.3. Getting attribute data</h3>
+<h3 id="access.attrdata"><a class="anchor" href="#access.attrdata"></a><a class="link" href="#access.attrdata">5.3. Getting attribute data</a></h3>
<div class="paragraph">
<p><a id="xml_attribute::name"></a><a id="xml_attribute::value"></a>
All attributes have name and value, both of which are strings (value may be empty). There are two corresponding accessors, like for <code>xml_node</code>:</p>
@@ -2153,7 +2167,7 @@ Number conversion functions depend on current C locale as set with <code>setloca
</div>
</div>
<div class="sect2">
-<h3 id="access.contents"><a class="anchor" href="#access.contents"></a>5.4. Contents-based traversal functions</h3>
+<h3 id="access.contents"><a class="anchor" href="#access.contents"></a><a class="link" href="#access.contents">5.4. Contents-based traversal functions</a></h3>
<div class="paragraph">
<p><a id="xml_node::child"></a><a id="xml_node::attribute"></a><a id="xml_node::next_sibling_name"></a><a id="xml_node::previous_sibling_name"></a>
Since a lot of document traversal consists of finding the node/attribute with the correct name, there are special functions for that purpose:</p>
@@ -2207,7 +2221,7 @@ Since a lot of document traversal consists of finding the node/attribute with th
</div>
</div>
<div class="sect2">
-<h3 id="access.rangefor"><a class="anchor" href="#access.rangefor"></a>5.5. Range-based for-loop support</h3>
+<h3 id="access.rangefor"><a class="anchor" href="#access.rangefor"></a><a class="link" href="#access.rangefor">5.5. Range-based for-loop support</a></h3>
<div class="paragraph">
<p><a id="xml_node::children"></a><a id="xml_node::attributes"></a>
If your C&#43;&#43; compiler supports range-based for-loop (this is a C&#43;&#43;11 feature, at the time of writing it&#8217;s supported by Microsoft Visual Studio 2012+, GCC 4.6+ and Clang 3.0+), you can use it to enumerate nodes/attributes. Additional helpers are provided to support this; note that they are also compatible with <a href="http://www.boost.org/libs/foreach/">Boost Foreach</a>, and possibly other pre-C&#43;&#43;11 foreach facilities.</p>
@@ -2247,7 +2261,7 @@ If your C&#43;&#43; compiler supports range-based for-loop (this is a C&#43;&#43
</div>
</div>
<div class="sect2">
-<h3 id="access.iterators"><a class="anchor" href="#access.iterators"></a>5.6. Traversing node/attribute lists via iterators</h3>
+<h3 id="access.iterators"><a class="anchor" href="#access.iterators"></a><a class="link" href="#access.iterators">5.6. Traversing node/attribute lists via iterators</a></h3>
<div class="paragraph">
<p><a id="xml_node_iterator"></a><a id="xml_attribute_iterator"></a><a id="xml_node::begin"></a><a id="xml_node::end"></a><a id="xml_node::attributes_begin"></a><a id="xml_node::attributes_end"></a>
Child node lists and attribute lists are simply double-linked lists; while you can use <code>previous_sibling</code>/<code>next_sibling</code> and other such functions for iteration, pugixml additionally provides node and attribute iterators, so that you can treat nodes as containers of other nodes or attributes:</p>
@@ -2307,7 +2321,7 @@ Node and attribute iterators are somewhere in the middle between const and non-c
</div>
</div>
<div class="sect2">
-<h3 id="access.walker"><a class="anchor" href="#access.walker"></a>5.7. Recursive traversal with xml_tree_walker</h3>
+<h3 id="access.walker"><a class="anchor" href="#access.walker"></a><a class="link" href="#access.walker">5.7. Recursive traversal with xml_tree_walker</a></h3>
<div id="xml_tree_walker" class="paragraph">
<p>The methods described above allow traversal of immediate children of some node; if you want to do a deep tree traversal, you&#8217;ll have to do it via a recursive function or some equivalent method. However, pugixml provides a helper for depth-first traversal of a subtree. In order to use it, you have to implement <code>xml_tree_walker</code> interface and to call <code>traverse</code> function:</p>
</div>
@@ -2375,7 +2389,7 @@ The traversal is launched by calling <code>traverse</code> function on traversal
</div>
</div>
<div class="sect2">
-<h3 id="access.predicate"><a class="anchor" href="#access.predicate"></a>5.8. Searching for nodes/attributes with predicates</h3>
+<h3 id="access.predicate"><a class="anchor" href="#access.predicate"></a><a class="link" href="#access.predicate">5.8. Searching for nodes/attributes with predicates</a></h3>
<div class="paragraph">
<p><a id="xml_node::find_attribute"></a><a id="xml_node::find_child"></a><a id="xml_node::find_node"></a>
While there are existing functions for getting a node/attribute with known contents, they are often not sufficient for simple queries. As an alternative for manual iteration through nodes/attributes until the needed one is found, you can make a predicate and call one of <code>find_</code> functions:</p>
@@ -2440,7 +2454,7 @@ While there are existing functions for getting a node/attribute with known conte
</div>
</div>
<div class="sect2">
-<h3 id="access.text"><a class="anchor" href="#access.text"></a>5.9. Working with text contents</h3>
+<h3 id="access.text"><a class="anchor" href="#access.text"></a><a class="link" href="#access.text">5.9. Working with text contents</a></h3>
<div id="xml_text" class="paragraph">
<p>It is common to store data as text contents of some node - i.e. <code>&lt;node&gt;&lt;description&gt;This is a node&lt;/description&gt;&lt;/node&gt;</code>. In this case, <code>&lt;description&gt;</code> node does not have a value, but instead has a child of type <a href="#node_pcdata">node_pcdata</a> with value <code>"This is a node"</code>. pugixml provides a special class, <code>xml_text</code>, to work with such data. Working with text objects to modify data is described in <a href="#modify.text">the documentation for modifying document data</a>; this section describes the access interface of <code>xml_text</code>.</p>
</div>
@@ -2518,7 +2532,7 @@ If you need a non-empty string if the text object is empty, or if the text conte
</div>
</div>
<div class="sect2">
-<h3 id="access.misc"><a class="anchor" href="#access.misc"></a>5.10. Miscellaneous functions</h3>
+<h3 id="access.misc"><a class="anchor" href="#access.misc"></a><a class="link" href="#access.misc">5.10. Miscellaneous functions</a></h3>
<div id="xml_node::root" class="paragraph">
<p>If you need to get the document root of some node, you can use the following function:</p>
</div>
@@ -2573,7 +2587,7 @@ While pugixml supports complex XPath expressions, sometimes a simple path handli
</div>
</div>
<div class="sect1">
-<h2 id="modify"><a class="anchor" href="#modify"></a>6. Modifying document data</h2>
+<h2 id="modify"><a class="anchor" href="#modify"></a><a class="link" href="#modify">6. Modifying document data</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. This section provides documentation for the relevant functions. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead.</p>
@@ -2582,7 +2596,7 @@ While pugixml supports complex XPath expressions, sometimes a simple path handli
<p>All member functions that change node/attribute data or structure are non-constant and thus can not be called on constant handles. However, you can easily convert constant handle to non-constant one by simple assignment: <code>void foo(const pugi::xml_node&amp; n) { pugi::xml_node nc = n; }</code>, so const-correctness here mainly provides additional documentation.</p>
</div>
<div class="sect2">
-<h3 id="modify.nodedata"><a class="anchor" href="#modify.nodedata"></a>6.1. Setting node data</h3>
+<h3 id="modify.nodedata"><a class="anchor" href="#modify.nodedata"></a><a class="link" href="#modify.nodedata">6.1. Setting node data</a></h3>
<div class="paragraph">
<p><a id="xml_node::set_name"></a><a id="xml_node::set_value"></a>
As discussed before, nodes can have name and value, both of which are strings. Depending on node type, name or value may be absent. <a href="#node_document">node_document</a> nodes do not have a name or value, <a href="#node_element">node_element</a> and <a href="#node_declaration">node_declaration</a> nodes always have a name but never have a value, <a href="#node_pcdata">node_pcdata</a>, <a href="#node_cdata">node_cdata</a>, <a href="#node_comment">node_comment</a> and <a href="#node_doctype">node_doctype</a> nodes never have a name but always have a value (it may be empty though), <a href="#node_pi">node_pi</a> nodes always have a name and a value (again, value may be empty). In order to set node&#8217;s name or value, you can use the following functions:</p>
@@ -2617,7 +2631,7 @@ As discussed before, nodes can have name and value, both of which are strings. D
</div>
</div>
<div class="sect2">
-<h3 id="modify.attrdata"><a class="anchor" href="#modify.attrdata"></a>6.2. Setting attribute data</h3>
+<h3 id="modify.attrdata"><a class="anchor" href="#modify.attrdata"></a><a class="link" href="#modify.attrdata">6.2. Setting attribute data</a></h3>
<div class="paragraph">
<p><a id="xml_attribute::set_name"></a><a id="xml_attribute::set_value"></a>
All attributes have name and value, both of which are strings (value may be empty). You can set them with the following functions:</p>
@@ -2638,6 +2652,8 @@ All attributes have name and value, both of which are strings (value may be empt
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -2680,6 +2696,8 @@ Number conversion functions depend on current C locale as set with <code>setloca
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">char_t</span><span class="tok-o">*</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_attribute</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -2712,7 +2730,7 @@ Number conversion functions depend on current C locale as set with <code>setloca
</div>
</div>
<div class="sect2">
-<h3 id="modify.add"><a class="anchor" href="#modify.add"></a>6.3. Adding nodes/attributes</h3>
+<h3 id="modify.add"><a class="anchor" href="#modify.add"></a><a class="link" href="#modify.add">6.3. Adding nodes/attributes</a></h3>
<div class="paragraph">
<p><a id="xml_node::prepend_attribute"></a><a id="xml_node::append_attribute"></a><a id="xml_node::insert_attribute_after"></a><a id="xml_node::insert_attribute_before"></a><a id="xml_node::prepend_child"></a><a id="xml_node::append_child"></a><a id="xml_node::insert_child_after"></a><a id="xml_node::insert_child_before"></a>
Nodes and attributes do not exist without a document tree, so you can&#8217;t create them without adding them to some document. A node or attribute can be created at the end of node/attribute list or before/after some other node:</p>
@@ -2807,7 +2825,7 @@ Nodes and attributes do not exist without a document tree, so you can&#8217;t cr
</div>
</div>
<div class="sect2">
-<h3 id="modify.remove"><a class="anchor" href="#modify.remove"></a>6.4. Removing nodes/attributes</h3>
+<h3 id="modify.remove"><a class="anchor" href="#modify.remove"></a><a class="link" href="#modify.remove">6.4. Removing nodes/attributes</a></h3>
<div class="paragraph">
<p><a id="xml_node::remove_attribute"></a><a id="xml_node::remove_child"></a>
If you do not want your document to contain some node or attribute, you can remove it with one of the following functions:</p>
@@ -2869,7 +2887,7 @@ If you do not want your document to contain some node or attribute, you can remo
</div>
</div>
<div class="sect2">
-<h3 id="modify.text"><a class="anchor" href="#modify.text"></a>6.5. Working with text contents</h3>
+<h3 id="modify.text"><a class="anchor" href="#modify.text"></a><a class="link" href="#modify.text">6.5. Working with text contents</a></h3>
<div class="paragraph">
<p>pugixml provides a special class, <code>xml_text</code>, to work with text contents stored as a value of some node, i.e. <code>&lt;node&gt;&lt;description&gt;This is a node&lt;/description&gt;&lt;/node&gt;</code>. Working with text objects to retrieve data is described in <a href="#access.text">the documentation for accessing document data</a>; this section describes the modification interface of <code>xml_text</code>.</p>
</div>
@@ -2891,6 +2909,8 @@ If you do not want your document to contain some node or attribute, you can remo
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-n">set</span><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -2909,6 +2929,8 @@ If you do not want your document to contain some node or attribute, you can remo
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">char_t</span><span class="tok-o">*</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <span class="tok-n">xml_text</span><span class="tok-o">::</span><span class="tok-k">operator</span><span class="tok-o">=</span><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -2934,7 +2956,7 @@ If you do not want your document to contain some node or attribute, you can remo
</div>
</div>
<div class="sect2">
-<h3 id="modify.clone"><a class="anchor" href="#modify.clone"></a>6.6. Cloning nodes/attributes</h3>
+<h3 id="modify.clone"><a class="anchor" href="#modify.clone"></a><a class="link" href="#modify.clone">6.6. Cloning nodes/attributes</a></h3>
<div class="paragraph">
<p><a id="xml_node::prepend_copy"></a><a id="xml_node::append_copy"></a><a id="xml_node::insert_copy_after"></a><a id="xml_node::insert_copy_before"></a>
With the help of previously described functions, it is possible to create trees with any contents and structure, including cloning the existing data. However since this is an often needed operation, pugixml provides built-in node/attribute cloning facilities. Since nodes and attributes do not exist without a document tree, you can&#8217;t create a standalone copy - you have to immediately insert it somewhere in the tree. For this, you can use one of the following functions:</p>
@@ -3030,7 +3052,7 @@ With the help of previously described functions, it is possible to create trees
</div>
</div>
<div class="sect2">
-<h3 id="modify.move"><a class="anchor" href="#modify.move"></a>6.7. Moving nodes</h3>
+<h3 id="modify.move"><a class="anchor" href="#modify.move"></a><a class="link" href="#modify.move">6.7. Moving nodes</a></h3>
<div class="paragraph">
<p><a id="xml_node::prepend_move"></a><a id="xml_node::append_move"></a><a id="xml_node::insert_move_after"></a><a id="xml_node::insert_move_before"></a>
Sometimes instead of cloning a node you need to move an existing node to a different position in a tree. This can be accomplished by copying the node and removing the original; however, this is expensive since it results in a lot of extra operations. For moving nodes within the same document tree, you can use of the following functions instead:</p>
@@ -3067,7 +3089,7 @@ Sometimes instead of cloning a node you need to move an existing node to a diffe
</div>
</div>
<div class="sect2">
-<h3 id="modify.fragments"><a class="anchor" href="#modify.fragments"></a>6.8. Assembling document from fragments</h3>
+<h3 id="modify.fragments"><a class="anchor" href="#modify.fragments"></a><a class="link" href="#modify.fragments">6.8. Assembling document from fragments</a></h3>
<div id="xml_node::append_buffer" class="paragraph">
<p>pugixml provides several ways to assemble an XML document from other XML documents. Assuming there is a set of document fragments, represented as in-memory buffers, the implementation choices are as follows:</p>
</div>
@@ -3123,7 +3145,7 @@ Sometimes instead of cloning a node you need to move an existing node to a diffe
</div>
</div>
<div class="sect1">
-<h2 id="saving"><a class="anchor" href="#saving"></a>7. Saving document</h2>
+<h2 id="saving"><a class="anchor" href="#saving"></a><a class="link" href="#saving">7. Saving document</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format (see <a href="#saving.options">Output options</a>), and also perform necessary encoding conversions (see <a href="#saving.encoding">Encodings</a>). This section documents the relevant functionality.</p>
@@ -3135,7 +3157,7 @@ Sometimes instead of cloning a node you need to move an existing node to a diffe
<p>CDATA sections with values that contain <code>"]]&gt;"</code> are split into several sections as follows: section with value <code>"pre]]&gt;post"</code> is written as <code>&lt;![CDATA[pre]]]]&gt;&lt;![CDATA[&gt;post]]&gt;</code>. While this alters the structure of the document (if you load the document after saving it, there will be two CDATA sections instead of one), this is the only way to escape CDATA contents.</p>
</div>
<div class="sect2">
-<h3 id="saving.file"><a class="anchor" href="#saving.file"></a>7.1. Saving document to a file</h3>
+<h3 id="saving.file"><a class="anchor" href="#saving.file"></a><a class="link" href="#saving.file">7.1. Saving document to a file</a></h3>
<div class="paragraph">
<p><a id="xml_document::save_file"></a><a id="xml_document::save_file_wide"></a>
If you want to save the whole document to a file, you can use one of the following functions:</p>
@@ -3166,7 +3188,7 @@ If you want to save the whole document to a file, you can use one of the followi
</div>
</div>
<div class="sect2">
-<h3 id="saving.stream"><a class="anchor" href="#saving.stream"></a>7.2. Saving document to C&#43;&#43; IOstreams</h3>
+<h3 id="saving.stream"><a class="anchor" href="#saving.stream"></a><a class="link" href="#saving.stream">7.2. Saving document to C&#43;&#43; IOstreams</a></h3>
<div id="xml_document::save_stream" class="paragraph">
<p>To enhance interoperability pugixml provides functions for saving document to any object which implements C&#43;&#43; <code>std::ostream</code> interface. This allows you to save documents to any standard C&#43;&#43; stream (i.e. file stream) or any third-party compliant implementation (i.e. Boost Iostreams). Most notably, this allows for easy debug output, since you can use <code>std::cout</code> stream as saving target. There are two functions, one works with narrow character streams, another handles wide character ones:</p>
</div>
@@ -3194,7 +3216,7 @@ If you want to save the whole document to a file, you can use one of the followi
</div>
</div>
<div class="sect2">
-<h3 id="saving.writer"><a class="anchor" href="#saving.writer"></a>7.3. Saving document via writer interface</h3>
+<h3 id="saving.writer"><a class="anchor" href="#saving.writer"></a><a class="link" href="#saving.writer">7.3. Saving document via writer interface</a></h3>
<div class="paragraph">
<p><a id="xml_document::save"></a><a id="xml_writer"></a><a id="xml_writer::write"></a>
All of the above saving functions are implemented in terms of writer interface. This is a simple interface with a single function, which is called several times during output process with chunks of document data as input:</p>
@@ -3234,7 +3256,7 @@ All of the above saving functions are implemented in terms of writer interface.
</div>
</div>
<div class="sect2">
-<h3 id="saving.subtree"><a class="anchor" href="#saving.subtree"></a>7.4. Saving a single subtree</h3>
+<h3 id="saving.subtree"><a class="anchor" href="#saving.subtree"></a><a class="link" href="#saving.subtree">7.4. Saving a single subtree</a></h3>
<div class="paragraph">
<p><a id="xml_node::print"></a><a id="xml_node::print_stream"></a>
While the previously described functions save the whole document to the destination, it is easy to save a single subtree. The following functions are provided:</p>
@@ -3273,7 +3295,7 @@ While the previously described functions save the whole document to the destinat
</div>
</div>
<div class="sect2">
-<h3 id="saving.options"><a class="anchor" href="#saving.options"></a>7.5. Output options</h3>
+<h3 id="saving.options"><a class="anchor" href="#saving.options"></a><a class="link" href="#saving.options">7.5. Output options</a></h3>
<div class="paragraph">
<p>All saving functions accept the optional parameter <code>flags</code>. This is a bitmask that customizes the output format; you can select the way the document nodes are printed and select the needed additional information that is output before the document contents.</p>
</div>
@@ -3306,6 +3328,9 @@ You should use the usual bitwise arithmetics to manipulate the bitmask: to enabl
<li>
<p><a id="format_no_escapes"></a><code>format_no_escapes</code> disables output escaping for attribute values and PCDATA contents. If this flag is off, special symbols (<code>"</code>, <code>&amp;</code>, <code>&lt;</code>, <code>&gt;</code>) and all non-printable characters (those with codepoint values less than 32) are converted to XML escape sequences (i.e. <code>&amp;amp;</code>) during output. If this flag is on, no text processing is performed; therefore, output XML can be malformed if output contents contains invalid symbols (i.e. having a stray <code>&lt;</code> in the PCDATA will make the output malformed). This flag is <strong>off</strong> by default.</p>
</li>
+<li>
+<p><a id="format_no_empty_element_tags"></a><code>format_no_empty_element_tags</code> determines if start/end tags should be output instead of empty element tags for empty elements (that is, elements with no children). This flag is <strong>off</strong> by default.</p>
+</li>
</ul>
</div>
<div class="paragraph">
@@ -3381,7 +3406,7 @@ contain platform-independent newline <code>\n</code> (ASCII 10). If this flag is
</div>
</div>
<div class="sect2">
-<h3 id="saving.encoding"><a class="anchor" href="#saving.encoding"></a>7.6. Encodings</h3>
+<h3 id="saving.encoding"><a class="anchor" href="#saving.encoding"></a><a class="link" href="#saving.encoding">7.6. Encodings</a></h3>
<div class="paragraph">
<p>pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it&#8217;s a strict subset of UTF-16) and handles all encoding conversions during output. The output encoding is set via the <code>encoding</code> parameter of saving functions, which is of type <code>xml_encoding</code>. The possible values for the encoding are documented in <a href="#loading.encoding">Encodings</a>; the only flag that has a different meaning is <code>encoding_auto</code>.</p>
</div>
@@ -3405,7 +3430,7 @@ The current behavior for Unicode conversion is to skip all invalid UTF sequences
</div>
</div>
<div class="sect2">
-<h3 id="saving.declaration"><a class="anchor" href="#saving.declaration"></a>7.7. Customizing document declaration</h3>
+<h3 id="saving.declaration"><a class="anchor" href="#saving.declaration"></a><a class="link" href="#saving.declaration">7.7. Customizing document declaration</a></h3>
<div class="paragraph">
<p>When you are saving the document using <code>xml_document::save()</code> or <code>xml_document::save_file()</code>, a default XML document declaration is output, if <code>format_no_declaration</code> is not specified and if the document does not have a declaration node. However, the default declaration is not customizable. If you want to customize the declaration output, you need to create the declaration node yourself.</p>
</div>
@@ -3451,13 +3476,13 @@ By default the declaration node is not added to the document during parsing. If
</div>
</div>
<div class="sect1">
-<h2 id="xpath"><a class="anchor" href="#xpath"></a>8. XPath</h2>
+<h2 id="xpath"><a class="anchor" href="#xpath"></a><a class="link" href="#xpath">8. XPath</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>If the task at hand is to select a subset of document nodes that match some criteria, it is possible to code a function using the existing traversal functionality for any practical criteria. However, often either a data-driven approach is desirable, in case the criteria are not predefined and come from a file, or it is inconvenient to use traversal interfaces and a higher-level DSL is required. There is a standard language for XML processing, XPath, that can be useful for these cases. pugixml implements an almost complete subset of XPath 1.0. Because of differences in document object model and some performance implications, there are minor violations of the official specifications, which can be found in <a href="#xpath.w3c">Conformance to W3C specification</a>. The rest of this section describes the interface for XPath functionality. Please note that if you wish to learn to use XPath language, you have to look for other tutorials or manuals; for example, you can read <a href="http://www.w3schools.com/xpath/">W3Schools XPath tutorial</a>, <a href="http://www.tizag.com/xmlTutorial/xpathtutorial.php">XPath tutorial at tizag.com</a>, and <a href="http://www.w3.org/TR/xpath/">the XPath 1.0 specification</a>.</p>
</div>
<div class="sect2">
-<h3 id="xpath.types"><a class="anchor" href="#xpath.types"></a>8.1. XPath types</h3>
+<h3 id="xpath.types"><a class="anchor" href="#xpath.types"></a><a class="link" href="#xpath.types">8.1. XPath types</a></h3>
<div class="paragraph">
<p><a id="xpath_value_type"></a><a id="xpath_type_number"></a><a id="xpath_type_string"></a><a id="xpath_type_boolean"></a><a id="xpath_type_node_set"></a><a id="xpath_type_none"></a>
Each XPath expression can have one of the following types: boolean, number, string or node set. Boolean type corresponds to <code>bool</code> type, number type corresponds to <code>double</code> type, string type corresponds to either <code>std::string</code> or <code>std::wstring</code>, depending on whether <a href="#dom.unicode">wide character interface is enabled</a>, and node set corresponds to <a href="#xpath_node_set">xpath_node_set</a> type. There is an enumeration, <code>xpath_value_type</code>, which can take the values <code>xpath_type_boolean</code>, <code>xpath_type_number</code>, <code>xpath_type_string</code> or <code>xpath_type_node_set</code>, accordingly.</p>
@@ -3566,7 +3591,7 @@ The order of iteration depends on the order of nodes inside the set; the order c
</div>
</div>
<div class="sect2">
-<h3 id="xpath.select"><a class="anchor" href="#xpath.select"></a>8.2. Selecting nodes via XPath expression</h3>
+<h3 id="xpath.select"><a class="anchor" href="#xpath.select"></a><a class="link" href="#xpath.select">8.2. Selecting nodes via XPath expression</a></h3>
<div class="paragraph">
<p><a id="xml_node::select_node"></a><a id="xml_node::select_nodes"></a>
If you want to select nodes that match some XPath expression, you can do it with the following functions:</p>
@@ -3619,7 +3644,7 @@ While compiling expressions is fast, the compilation time can introduce a signif
</div>
</div>
<div class="sect2">
-<h3 id="xpath.query"><a class="anchor" href="#xpath.query"></a>8.3. Using query objects</h3>
+<h3 id="xpath.query"><a class="anchor" href="#xpath.query"></a><a class="link" href="#xpath.query">8.3. Using query objects</a></h3>
<div id="xpath_query" class="paragraph">
<p>When you call <code>select_nodes</code> with an expression string as an argument, a query object is created behind the scenes. A query object represents a compiled XPath expression. Query objects can be needed in the following circumstances:</p>
</div>
@@ -3734,7 +3759,7 @@ Calling <code>node.select_nodes("query")</code> is equivalent to calling <code>x
</div>
</div>
<div class="sect2">
-<h3 id="xpath.variables"><a class="anchor" href="#xpath.variables"></a>8.4. Using variables</h3>
+<h3 id="xpath.variables"><a class="anchor" href="#xpath.variables"></a><a class="link" href="#xpath.variables">8.4. Using variables</a></h3>
<div class="paragraph">
<p>XPath queries may contain references to variables; this is useful if you want to use queries that depend on some dynamic parameter without manually preparing the complete query string, or if you want to reuse the same query object for similar queries.</p>
</div>
@@ -3883,7 +3908,7 @@ In order to get variable value, you should use one of the following functions, d
</div>
</div>
<div class="sect2">
-<h3 id="xpath.errors"><a class="anchor" href="#xpath.errors"></a>8.5. Error handling</h3>
+<h3 id="xpath.errors"><a class="anchor" href="#xpath.errors"></a><a class="link" href="#xpath.errors">8.5. Error handling</a></h3>
<div class="paragraph">
<p>There are two different mechanisms for error handling in XPath implementation; the mechanism used depends on whether exception support is disabled (this is controlled with <a href="#PUGIXML_NO_EXCEPTIONS">PUGIXML_NO_EXCEPTIONS</a> define).</p>
</div>
@@ -3974,7 +3999,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="xpath.w3c"><a class="anchor" href="#xpath.w3c"></a>8.6. Conformance to W3C specification</h3>
+<h3 id="xpath.w3c"><a class="anchor" href="#xpath.w3c"></a><a class="link" href="#xpath.w3c">8.6. Conformance to W3C specification</a></h3>
<div class="paragraph">
<p>Because of the differences in document object models, performance considerations and implementation complexity, pugixml does not provide a fully conformant XPath 1.0 implementation. This is the current list of incompatibilities:</p>
</div>
@@ -4001,10 +4026,75 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect1">
-<h2 id="changes"><a class="anchor" href="#changes"></a>9. Changelog</h2>
+<h2 id="changes"><a class="anchor" href="#changes"></a><a class="link" href="#changes">9. Changelog</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="v1.7"><a class="anchor" href="#v1.7"></a>v1.7 <sup>2015-10-19</sup></h3>
+<h3 id="v1.8"><a class="anchor" href="#v1.8"></a><a class="link" href="#v1.8">v1.8 <sup>2016-11-24</sup></a></h3>
+<div class="paragraph">
+<p>Maintenance release. Changes:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Specification changes:</p>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>When printing empty elements, a space is no longer added before / in format_raw mode</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>New features:</p>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Added parse_embed_pcdata parsing mode in which PCDATA value is stored in the element node if possible (significantly reducing memory consumption for some documents)</p>
+</li>
+<li>
+<p>Added auto-detection support for Latin-1 (ISO-8859-1) encoding during parsing</p>
+</li>
+<li>
+<p>Added format_no_empty_element_tags formatting flag that outputs start/end tags instead of empty element tags for empty elements</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Performance improvements:</p>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Minor memory allocation improvements (yielding up to 1% memory savings in some cases)</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>Compatibility improvements:</p>
+<div class="olist arabic">
+<ol class="arabic">
+<li>
+<p>Fixed compilation issues for Borland C++ 5.4</p>
+</li>
+<li>
+<p>Fixed compilation issues for some distributions of MinGW 3.8</p>
+</li>
+<li>
+<p>Fixed various Clang/GCC warnings</p>
+</li>
+<li>
+<p>Enabled move semantics support for XPath objects for MSVC 2010 and above</p>
+</li>
+</ol>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="v1.7"><a class="anchor" href="#v1.7"></a><a class="link" href="#v1.7">v1.7 <sup>2015-10-19</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring performance and memory improvements along with some new features. Changes:</p>
</div>
@@ -4078,7 +4168,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v1.6"><a class="anchor" href="#v1.6"></a>v1.6 <sup>2015-04-10</sup></h3>
+<h3 id="v1.6"><a class="anchor" href="#v1.6"></a><a class="link" href="#v1.6">v1.6 <sup>2015-04-10</sup></a></h3>
<div class="paragraph">
<p>Maintenance release. Changes:</p>
</div>
@@ -4120,7 +4210,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v1.5"><a class="anchor" href="#v1.5"></a>v1.5 <sup>2014-11-27</sup></h3>
+<h3 id="v1.5"><a class="anchor" href="#v1.5"></a><a class="link" href="#v1.5">v1.5 <sup>2014-11-27</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring a lot of performance improvements and some new features.</p>
</div>
@@ -4219,7 +4309,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v1.4"><a class="anchor" href="#v1.4"></a>v1.4 <sup>2014-02-27</sup></h3>
+<h3 id="v1.4"><a class="anchor" href="#v1.4"></a><a class="link" href="#v1.4">v1.4 <sup>2014-02-27</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring various new features, bug fixes and compatibility improvements.</p>
</div>
@@ -4305,7 +4395,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v1.2"><a class="anchor" href="#v1.2"></a>v1.2 <sup>2012-05-01</sup></h3>
+<h3 id="v1.2"><a class="anchor" href="#v1.2"></a><a class="link" href="#v1.2">v1.2 <sup>2012-05-01</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring header-only mode, various interface enhancements (i.e. PCDATA manipulation and C&#43;&#43;11 iteration), many other features and compatibility improvements.</p>
</div>
@@ -4390,7 +4480,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v1.0"><a class="anchor" href="#v1.0"></a>v1.0 <sup>2010-11-01</sup></h3>
+<h3 id="v1.0"><a class="anchor" href="#v1.0"></a><a class="link" href="#v1.0">v1.0 <sup>2010-11-01</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring many XPath enhancements, wide character filename support, miscellaneous performance improvements, bug fixes and more.</p>
</div>
@@ -4586,7 +4676,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.9"><a class="anchor" href="#v0.9"></a>v0.9 <sup>2010-07-01</sup></h3>
+<h3 id="v0.9"><a class="anchor" href="#v0.9"></a><a class="link" href="#v0.9">v0.9 <sup>2010-07-01</sup></a></h3>
<div class="paragraph">
<p>Major release, featuring extended and improved Unicode support, miscellaneous performance improvements, bug fixes and more.</p>
</div>
@@ -4701,7 +4791,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.5"><a class="anchor" href="#v0.5"></a>v0.5 <sup>2009-11-08</sup></h3>
+<h3 id="v0.5"><a class="anchor" href="#v0.5"></a><a class="link" href="#v0.5">v0.5 <sup>2009-11-08</sup></a></h3>
<div class="paragraph">
<p>Major bugfix release. Changes:</p>
</div>
@@ -4808,7 +4898,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.42"><a class="anchor" href="#v0.42"></a>v0.42 <sup>2009-09-17</sup></h3>
+<h3 id="v0.42"><a class="anchor" href="#v0.42"></a><a class="link" href="#v0.42">v0.42 <sup>2009-09-17</sup></a></h3>
<div class="paragraph">
<p>Maintenance release. Changes:</p>
</div>
@@ -4853,7 +4943,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.41"><a class="anchor" href="#v0.41"></a>v0.41 <sup>2009-02-08</sup></h3>
+<h3 id="v0.41"><a class="anchor" href="#v0.41"></a><a class="link" href="#v0.41">v0.41 <sup>2009-02-08</sup></a></h3>
<div class="paragraph">
<p>Maintenance release. Changes:</p>
</div>
@@ -4873,7 +4963,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.4"><a class="anchor" href="#v0.4"></a>v0.4 <sup>2009-01-18</sup></h3>
+<h3 id="v0.4"><a class="anchor" href="#v0.4"></a><a class="link" href="#v0.4">v0.4 <sup>2009-01-18</sup></a></h3>
<div class="paragraph">
<p>Changes:</p>
</div>
@@ -4940,7 +5030,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.34"><a class="anchor" href="#v0.34"></a>v0.34 <sup>2007-10-31</sup></h3>
+<h3 id="v0.34"><a class="anchor" href="#v0.34"></a><a class="link" href="#v0.34">v0.34 <sup>2007-10-31</sup></a></h3>
<div class="paragraph">
<p>Maintenance release. Changes:</p>
</div>
@@ -4982,7 +5072,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.3"><a class="anchor" href="#v0.3"></a>v0.3 <sup>2007-02-21</sup></h3>
+<h3 id="v0.3"><a class="anchor" href="#v0.3"></a><a class="link" href="#v0.3">v0.3 <sup>2007-02-21</sup></a></h3>
<div class="paragraph">
<p>Refactored, reworked and improved version. Changes:</p>
</div>
@@ -5048,7 +5138,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.2"><a class="anchor" href="#v0.2"></a>v0.2 <sup>2006-11-06</sup></h3>
+<h3 id="v0.2"><a class="anchor" href="#v0.2"></a><a class="link" href="#v0.2">v0.2 <sup>2006-11-06</sup></a></h3>
<div class="paragraph">
<p>First public release. Changes:</p>
</div>
@@ -5087,7 +5177,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="v0.1"><a class="anchor" href="#v0.1"></a>v0.1 <sup>2006-07-15</sup></h3>
+<h3 id="v0.1"><a class="anchor" href="#v0.1"></a><a class="link" href="#v0.1">v0.1 <sup>2006-07-15</sup></a></h3>
<div class="paragraph">
<p>First private release for testing purposes</p>
</div>
@@ -5095,13 +5185,13 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect1">
-<h2 id="apiref"><a class="anchor" href="#apiref"></a>10. API Reference</h2>
+<h2 id="apiref"><a class="anchor" href="#apiref"></a><a class="link" href="#apiref">10. API Reference</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>This is the reference for all macros, types, enumerations, classes and functions in pugixml. Each symbol is a link that leads to the relevant section of the manual.</p>
</div>
<div class="sect2">
-<h3 id="apiref.macros"><a class="anchor" href="#apiref.macros"></a>10.1. Macros</h3>
+<h3 id="apiref.macros"><a class="anchor" href="#apiref.macros"></a><a class="link" href="#apiref.macros">10.1. Macros</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-cp">#define <a href="#PUGIXML_WCHAR_MODE">PUGIXML_WCHAR_MODE</a></span>
@@ -5121,7 +5211,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="apiref.types"><a class="anchor" href="#apiref.types"></a>10.2. Types</h3>
+<h3 id="apiref.types"><a class="anchor" href="#apiref.types"></a><a class="link" href="#apiref.types">10.2. Types</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">typedef</span> <span class="tok-n">configuration</span><span class="tok-o">-</span><span class="tok-n">defined</span><span class="tok-o">-</span><span class="tok-n">type</span> <a href="#char_t">char_t</a><span class="tok-p">;</span>
@@ -5132,7 +5222,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="apiref.enums"><a class="anchor" href="#apiref.enums"></a>10.3. Enumerations</h3>
+<h3 id="apiref.enums"><a class="anchor" href="#apiref.enums"></a><a class="link" href="#apiref.enums">10.3. Enumerations</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">enum</span> <a href="#xml_node_type">xml_node_type</a>
@@ -5187,7 +5277,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="apiref.constants"><a class="anchor" href="#apiref.constants"></a>10.4. Constants</h3>
+<h3 id="apiref.constants"><a class="anchor" href="#apiref.constants"></a><a class="link" href="#apiref.constants">10.4. Constants</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// Formatting options bit flags:</span>
@@ -5195,6 +5285,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_indent">format_indent</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_indent_attributes">format_indent_attributes</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_no_declaration">format_no_declaration</a>
+<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_no_empty_element_tags">format_no_empty_element_tags</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_no_escapes">format_no_escapes</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_raw">format_raw</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#format_save_file_text">format_save_file_text</a>
@@ -5215,13 +5306,14 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_trim_pcdata">parse_trim_pcdata</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_ws_pcdata">parse_ws_pcdata</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_ws_pcdata_single">parse_ws_pcdata_single</a>
+<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_embed_pcdata">parse_embed_pcdata</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_wconv_attribute">parse_wconv_attribute</a>
<span class="tok-k">const</span> <span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <a href="#parse_wnorm_attribute">parse_wnorm_attribute</a></code></pre>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="apiref.classes"><a class="anchor" href="#apiref.classes"></a>10.5. Classes</h3>
+<h3 id="apiref.classes"><a class="anchor" href="#apiref.classes"></a><a class="link" href="#apiref.classes">10.5. Classes</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">class</span> <a href="#xml_attribute">xml_attribute</a>
@@ -5258,6 +5350,8 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">char_t</span><span class="tok-o">*</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_attribute::set_value">set_value</a><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -5267,6 +5361,8 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">char_t</span><span class="tok-o">*</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_attribute</span><span class="tok-o">&amp;</span> <a href="#xml_attribute::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -5451,6 +5547,8 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-kt">bool</span> <a href="#xml_text::set">set</a><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -5460,6 +5558,8 @@ If exceptions are disabled, then in the event of parsing failure the query is in
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">char_t</span><span class="tok-o">*</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">int</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
+ <span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">unsigned</span> <span class="tok-kt">long</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">double</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">float</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
<span class="tok-n">xml_text</span><span class="tok-o">&amp;</span> <a href="#xml_text::assign">operator=</a><span class="tok-p">(</span><span class="tok-kt">bool</span> <span class="tok-n">rhs</span><span class="tok-p">);</span>
@@ -5564,7 +5664,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
</div>
<div class="sect2">
-<h3 id="apiref.functions"><a class="anchor" href="#apiref.functions"></a>10.6. Functions</h3>
+<h3 id="apiref.functions"><a class="anchor" href="#apiref.functions"></a><a class="link" href="#apiref.functions">10.6. Functions</a></h3>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">string</span> <a href="#as_utf8">as_utf8</a><span class="tok-p">(</span><span class="tok-k">const</span> <span class="tok-kt">wchar_t</span><span class="tok-o">*</span> <span class="tok-n">str</span><span class="tok-p">);</span>
@@ -5588,7 +5688,7 @@ If exceptions are disabled, then in the event of parsing failure the query is in
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2016-01-19 08:45:46 PST
+Last updated 2016-11-24 00:20:49 STD
</div>
</div>
</body>
diff --git a/docs/quickstart.html b/docs/quickstart.html
index 4641554..382fca0 100644
--- a/docs/quickstart.html
+++ b/docs/quickstart.html
@@ -4,21 +4,20 @@
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 1.5.2">
+<meta name="generator" content="Asciidoctor 1.5.5">
<meta name="author" content="website, repository">
-<title>pugixml 1.7 quick start guide</title>
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
+<title>pugixml 1.8 quick start guide</title>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
-/* Remove the comments around the @import statement below when using this as a custom stylesheet */
-/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/
+/* Remove comment around @import statement below when using as a custom stylesheet */
+/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
script{display:none!important}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
-body{margin:0}
a{background:transparent}
a:focus{outline:thin dotted}
a:active,a:hover{outline:0}
@@ -53,12 +52,11 @@ textarea{overflow:auto;vertical-align:top}
table{border-collapse:collapse;border-spacing:0}
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
html,body{font-size:100%}
-body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
+body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
a:hover{cursor:pointer}
img,object,embed{max-width:100%;height:auto}
object,embed{height:100%}
img{-ms-interpolation-mode:bicubic}
-#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important}
.left{float:left!important}
.right{float:right!important}
.text-left{text-align:left!important}
@@ -66,10 +64,11 @@ img{-ms-interpolation-mode:bicubic}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.hide{display:none}
-.antialiased,body{-webkit-font-smoothing:antialiased}
-img{display:inline-block;vertical-align:middle}
+img,object,svg{display:inline-block;vertical-align:middle}
textarea{height:auto;min-height:50px}
select{width:100%}
+.center{margin-left:auto;margin-right:auto}
+.spread{width:100%}
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
@@ -112,7 +111,8 @@ blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
h1{font-size:2.75em}
h2{font-size:2.3125em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
-h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
+h4{font-size:1.4375em}}
+table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
@@ -122,10 +122,14 @@ h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-s
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
.clearfix:after,.float-group:after{clear:both}
-*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
+*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
+*:not(pre)>code.nobreak{word-wrap:normal}
+*:not(pre)>code.nowrap{white-space:nowrap}
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
+em em{font-style:normal}
+strong strong{font-weight:400}
.keyseq{color:rgba(51,51,51,.8)}
-kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
+kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
.menuseq,.menu{color:rgba(0,0,0,.8)}
@@ -156,29 +160,33 @@ p a>code:hover{color:rgba(0,0,0,.9)}
#toc ul.sectlevel0>li>a{font-style:italic}
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
+#toc li{line-height:1.3334;margin-top:.3334em}
#toc a{text-decoration:none}
#toc a:active{text-decoration:underline}
#toctitle{color:#7a2518;font-size:1.2em}
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
-#toc.toc2 #toctitle{margin-top:0;font-size:1.2em}
+#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
body.toc2.toc-right{padding-left:0;padding-right:15em}
-body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
+body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}
+@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
#toc.toc2{width:20em}
#toc.toc2 #toctitle{font-size:1.375em}
#toc.toc2>ul{font-size:.95em}
#toc.toc2 ul ul{padding-left:1.25em}
-body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
+body.toc2.toc-right{padding-left:0;padding-right:20em}}
+#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
#content #toc>:first-child{margin-top:0}
#content #toc>:last-child{margin-bottom:0}
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
.sect1{padding-bottom:.625em}
-@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed}
+@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
+.sect1+.sect1{border-top:1px solid #efefed}
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
@@ -207,7 +215,9 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
-@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
+@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
+@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
+.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
@@ -217,7 +227,7 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
-table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0}
+table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
table.pyhltable td.code{padding-left:.75em;padding-right:0}
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
pre.pygments .lineno{display:inline-block;margin-right:.25em}
@@ -238,13 +248,12 @@ table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
.quoteblock .attribution br,.verseblock .attribution br{display:none}
-.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)}
+.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
table.tableblock{max-width:100%;border-collapse:separate}
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
-table.spread{width:100%}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0}
table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0}
@@ -290,8 +299,8 @@ ol.upperroman{list-style-type:upper-roman}
ol.lowergreek{list-style-type:lower-greek}
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
-td.hdlist1{padding-right:.75em;font-weight:bold}
-td.hdlist1,td.hdlist2{vertical-align:top}
+td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
+td.hdlist1{font-weight:bold;padding-bottom:1.25em}
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1}
.colist>table tr>td:last-of-type{padding:.25em 0}
@@ -304,13 +313,14 @@ td.hdlist1,td.hdlist2{vertical-align:top}
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
.image.left{margin-right:.625em}
.image.right{margin-left:.625em}
-a.image{text-decoration:none}
-span.footnote,span.footnoteref{vertical-align:super;font-size:.875em}
-span.footnote a,span.footnoteref a{text-decoration:none}
-span.footnote a:active,span.footnoteref a:active{text-decoration:underline}
+a.image{text-decoration:none;display:inline-block}
+a.image object{pointer-events:none}
+sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
+sup.footnote a,sup.footnoteref a{text-decoration:none}
+sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
-#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em}
+#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em}
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
@@ -368,11 +378,10 @@ span.icon>.fa{cursor:default}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
-h1,h2{letter-spacing:-.01em}
-dt,th.tableblock,td.content{text-rendering:optimizeLegibility}
-p,td.content{letter-spacing:-.01em}
-p strong,td.content strong{letter-spacing:-.005em}
-p,blockquote,dt,td.content{font-size:1.0625rem}
+dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
+h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
+p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
+p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
@@ -383,9 +392,9 @@ a{color:inherit!important;text-decoration:underline!important}
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]:after{content:" (" attr(title) ")"}
-pre,blockquote,tr,img{page-break-inside:avoid}
+pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
thead{display:table-header-group}
-img{max-width:100%!important}
+svg{max-width:100%}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
@@ -411,7 +420,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</style>
<style>
.listingblock .pygments .hll { background-color: #ffffcc }
-.listingblock .pygments { background: #f8f8f8; }
+.listingblock .pygments, .listingblock .pygments code { background: #f8f8f8; }
.listingblock .pygments .tok-c { color: #408080; font-style: italic } /* Comment */
.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */
.listingblock .pygments .tok-k { color: #008000; font-weight: bold } /* Keyword */
@@ -477,7 +486,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</head>
<body class="article toc2 toc-right">
<div id="header">
-<h1>pugixml 1.7 quick start guide</h1>
+<h1>pugixml 1.8 quick start guide</h1>
<div class="details">
<span id="author" class="author">website</span><br>
<span id="email" class="email"><a href="http://pugixml.org" class="bare">http://pugixml.org</a></span><br>
@@ -501,7 +510,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
<div id="content">
<div class="sect1">
-<h2 id="introduction"><a class="anchor" href="#introduction"></a>Introduction</h2>
+<h2 id="introduction"><a class="anchor" href="#introduction"></a><a class="link" href="#introduction">Introduction</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="http://pugixml.org/">pugixml</a> is a light-weight C&#43;&#43; XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <a href="#license">MIT license</a>, making it completely free to use in both open-source and proprietary applications.</p>
@@ -527,15 +536,15 @@ No documentation is perfect; neither is this one. If you find errors or omission
</div>
</div>
<div class="sect1">
-<h2 id="install"><a class="anchor" href="#install"></a>Installation</h2>
+<h2 id="install"><a class="anchor" href="#install"></a><a class="link" href="#install">Installation</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can download the latest source distribution as an archive:</p>
</div>
<div class="paragraph">
-<p><a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.zip">pugixml-1.7.zip</a> (Windows line endings)
+<p><a href="https://github.com/zeux/pugixml/releases/download/v1.8/pugixml-1.8.zip">pugixml-1.8.zip</a> (Windows line endings)
/
-<a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.tar.gz">pugixml-1.7.tar.gz</a> (Unix line endings)</p>
+<a href="https://github.com/zeux/pugixml/releases/download/v1.8/pugixml-1.8.tar.gz">pugixml-1.8.tar.gz</a> (Unix line endings)</p>
</div>
<div class="paragraph">
<p>The distribution contains library source, documentation (the guide you&#8217;re reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.</p>
@@ -544,12 +553,12 @@ No documentation is perfect; neither is this one. If you find errors or omission
<p>The complete pugixml source consists of three files - one source file, <code>pugixml.cpp</code>, and two header files, <code>pugixml.hpp</code> and <code>pugiconfig.hpp</code>. <code>pugixml.hpp</code> is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that <code>pugixml.hpp</code> is either in the current directory or in one of include directories of your projects, so that <code>#include "pugixml.hpp"</code> can find the header; however you can also use relative path (i.e. <code>#include "../libs/pugixml/src/pugixml.hpp"</code>) or include directory-relative path (i.e. <code>#include &lt;xml/thirdparty/pugixml/src/pugixml.hpp&gt;</code>).</p>
</div>
<div class="paragraph">
-<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you&#8217;re using Microsoft Visual Studio <span class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</span>, Apple Xcode, Code::Blocks or any other IDE, just add <code>pugixml.cpp</code> to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; <a href="manual/install.html#install.building">read the manual</a> for further information.</p>
+<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you&#8217;re using Microsoft Visual Studio <sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</sup>, Apple Xcode, Code::Blocks or any other IDE, just add <code>pugixml.cpp</code> to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; <a href="manual.html#install.building">read the manual</a> for further information.</p>
</div>
</div>
</div>
<div class="sect1">
-<h2 id="dom"><a class="anchor" href="#dom"></a>Document object model</h2>
+<h2 id="dom"><a class="anchor" href="#dom"></a><a class="link" href="#dom">Document object model</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from character stream (file, string, C&#43;&#43; I/O stream), then traversed via special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C&#43;&#43; I/O stream or custom transport).</p>
@@ -606,7 +615,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
</div>
</div>
<div class="sect1">
-<h2 id="loading"><a class="anchor" href="#loading"></a>Loading document</h2>
+<h2 id="loading"><a class="anchor" href="#loading"></a><a class="link" href="#loading">Loading document</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml provides several functions for loading XML data from various places - files, C&#43;&#43; iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons. XML data is always converted to internal character format before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it&#8217;s a strict subset of UTF-16) and handles all encoding conversions automatically.</p>
@@ -692,7 +701,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
</div>
</div>
<div class="sect1">
-<h2 id="access"><a class="anchor" href="#access"></a>Accessing document data</h2>
+<h2 id="access"><a class="anchor" href="#access"></a><a class="link" href="#access">Accessing document data</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>pugixml features an extensive interface for getting various types of data from the document and for traversing the document. You can use various accessors to get node/attribute data, you can traverse the child node/attribute lists via accessors or iterators, you can do depth-first traversals with <code>xml_tree_walker</code> objects, and you can use XPath for complex data-driven queries.</p>
@@ -847,7 +856,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
</div>
</div>
<div class="sect1">
-<h2 id="modify"><a class="anchor" href="#modify"></a>Modifying document data</h2>
+<h2 id="modify"><a class="anchor" href="#modify"></a><a class="link" href="#modify">Modifying document data</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead.</p>
@@ -951,7 +960,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
</div>
</div>
<div class="sect1">
-<h2 id="saving"><a class="anchor" href="#saving"></a>Saving document</h2>
+<h2 id="saving"><a class="anchor" href="#saving"></a><a class="link" href="#saving">Saving document</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format, and also perform necessary encoding conversions.</p>
@@ -1006,7 +1015,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
</div>
</div>
<div class="sect1">
-<h2 id="feedback"><a class="anchor" href="#feedback"></a>Feedback</h2>
+<h2 id="feedback"><a class="anchor" href="#feedback"></a><a class="link" href="#feedback">Feedback</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you believe you&#8217;ve found a bug in pugixml, please file an issue via <a href="https://github.com/zeux/pugixml/issues/new">issue submission form</a>. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc. Feature requests and contributions can be filed as issues, too.</p>
@@ -1017,7 +1026,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
</div>
</div>
<div class="sect1">
-<h2 id="license"><a class="anchor" href="#license"></a>License</h2>
+<h2 id="license"><a class="anchor" href="#license"></a><a class="link" href="#license">License</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>The pugixml library is distributed under the MIT license:</p>
@@ -1068,7 +1077,7 @@ pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2015-12-31 17:19:05 MSK
+Last updated 2016-11-24 00:20:49 STD
</div>
</div>
</body>