diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-01-07 20:28:42 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-01-07 20:28:42 -0800 |
commit | 3f28a5d97af9265f3989587aa873a40a6ae1ca94 (patch) | |
tree | 3b2b36c45fab3700db973b85032f75fb3eecd735 /docs | |
parent | f360842d484e15601130d6a6cbb593a63c785e0b (diff) |
Update all copyright notices to specify year 2018
Diffstat (limited to 'docs')
-rw-r--r-- | docs/manual.adoc | 4 | ||||
-rw-r--r-- | docs/manual.html | 123 | ||||
-rw-r--r-- | docs/quickstart.adoc | 4 | ||||
-rw-r--r-- | docs/quickstart.html | 6 |
4 files changed, 67 insertions, 70 deletions
diff --git a/docs/manual.adoc b/docs/manual.adoc index b901a54..ea4aee3 100644 --- a/docs/manual.adoc +++ b/docs/manual.adoc @@ -46,7 +46,7 @@ Thanks to *Vyacheslav Egorov* for documentation proofreading and fuzz testing. The pugixml library is distributed under the MIT license: .... -Copyright (c) 2006-2017 Arseny Kapoulkine +Copyright (c) 2006-2018 Arseny Kapoulkine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -74,7 +74,7 @@ This means that you can freely use pugixml in your applications, both open-sourc .... This software is based on pugixml library (http://pugixml.org). -pugixml is Copyright (C) 2006-2017 Arseny Kapoulkine. +pugixml is Copyright (C) 2006-2018 Arseny Kapoulkine. .... [[install]] diff --git a/docs/manual.html b/docs/manual.html index 1bed481..0cd542f 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -4,7 +4,7 @@ <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.6.1"> +<meta name="generator" content="Asciidoctor 1.5.5"> <meta name="author" content="website, repository"> <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"> @@ -90,12 +90,13 @@ strong,b{font-weight:bold;line-height:inherit} small{font-size:60%;line-height:inherit} code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol{margin-left:1.5em} +ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} ul.square{list-style-type:square} ul.circle{list-style-type:circle} ul.disc{list-style-type:disc} +ul.no-bullet{list-style:none} ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} dl dt{margin-bottom:.3125em;font-weight:bold} dl dd{margin-bottom:1.25em} @@ -131,11 +132,7 @@ strong strong{font-weight:400} 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,.menuref{color:#000} -.menuseq b:not(.caret),.menuref{font-weight:inherit} -.menuseq{word-spacing:-.02em} -.menuseq b.caret{font-size:1.25em;line-height:.8} -.menuseq i.caret{font-weight:bold;text-align:center;width:.45em} +.menuseq,.menu{color:rgba(0,0,0,.8)} b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} b.button:before{content:"[";padding:0 3px 0 2px} b.button:after{content:"]";padding:0 2px 0 3px} @@ -202,7 +199,7 @@ table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} .admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:initial} +.admonitionblock>table td.icon img{max-width:none} .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} @@ -258,13 +255,13 @@ table.pyhltable .linenodiv{background:none!important;padding-right:0!important} 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.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0} -table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0} -table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0} -table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px 0} -table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0 0} -table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0} -table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0} +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} +table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} +table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} +table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} +table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} +table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} table.frame-all{border-width:1px} table.frame-sides{border-width:0 1px} table.frame-topbot{border-width:1px 0} @@ -285,12 +282,10 @@ ul li ol{margin-left:1.5em} dl dd{margin-left:1.125em} dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none} -ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em} -ul.unstyled,ol.unstyled{margin-left:0} -ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} +ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} +ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} ul.inline>li>*{display:block} @@ -307,8 +302,7 @@ ol.lowergreek{list-style-type:lower-greek} 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:.4em .75em 0 .75em;line-height:1;vertical-align:top} -.colist>table tr>td:first-of-type img{max-width:initial} +.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} .colist>table tr>td:last-of-type{padding:.25em 0} .thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} .imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} @@ -371,7 +365,6 @@ div.unbreakable{page-break-inside:avoid} .yellow{color:#bfbf00} .yellow-background{background-color:#fafa00} span.icon>.fa{cursor:default} -a span.icon>.fa{cursor:inherit} .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} .admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} .admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} @@ -475,8 +468,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b .listingblock .pygments .tok-mh { color: #666666 } /* Literal.Number.Hex */ .listingblock .pygments .tok-mi { color: #666666 } /* Literal.Number.Integer */ .listingblock .pygments .tok-mo { color: #666666 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sa { color: #BA2121 } /* Literal.String.Affix */ .listingblock .pygments .tok-sb { color: #BA2121 } /* Literal.String.Backtick */ .listingblock .pygments .tok-sc { color: #BA2121 } /* Literal.String.Char */ +.listingblock .pygments .tok-dl { color: #BA2121 } /* Literal.String.Delimiter */ .listingblock .pygments .tok-sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .listingblock .pygments .tok-s2 { color: #BA2121 } /* Literal.String.Double */ .listingblock .pygments .tok-se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ @@ -487,9 +482,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b .listingblock .pygments .tok-s1 { color: #BA2121 } /* Literal.String.Single */ .listingblock .pygments .tok-ss { color: #19177C } /* Literal.String.Symbol */ .listingblock .pygments .tok-bp { color: #008000 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-fm { color: #0000FF } /* Name.Function.Magic */ .listingblock .pygments .tok-vc { color: #19177C } /* Name.Variable.Class */ .listingblock .pygments .tok-vg { color: #19177C } /* Name.Variable.Global */ .listingblock .pygments .tok-vi { color: #19177C } /* Name.Variable.Instance */ +.listingblock .pygments .tok-vm { color: #19177C } /* Name.Variable.Magic */ .listingblock .pygments .tok-il { color: #666666 } /* Literal.Number.Integer.Long */ </style> </head> @@ -543,28 +540,28 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </li> <li><a href="#access">5. Accessing document data</a> <ul class="sectlevel2"> -<li><a href="#access.basic">Basic traversal functions</a></li> -<li><a href="#access.nodedata">5.1. Getting node data</a></li> -<li><a href="#access.attrdata">5.2. Getting attribute data</a></li> -<li><a href="#access.contents">5.3. Contents-based traversal functions</a></li> -<li><a href="#access.rangefor">5.4. Range-based for-loop support</a></li> -<li><a href="#access.iterators">5.5. Traversing node/attribute lists via iterators</a></li> -<li><a href="#access.walker">5.6. Recursive traversal with xml_tree_walker</a></li> -<li><a href="#access.predicate">5.7. Searching for nodes/attributes with predicates</a></li> -<li><a href="#access.text">5.8. Working with text contents</a></li> -<li><a href="#access.misc">5.9. Miscellaneous functions</a></li> +<li><a href="#access.basic">5.1. Basic traversal functions</a></li> +<li><a href="#access.nodedata">5.2. Getting node data</a></li> +<li><a href="#access.attrdata">5.3. Getting attribute data</a></li> +<li><a href="#access.contents">5.4. Contents-based traversal functions</a></li> +<li><a href="#access.rangefor">5.5. Range-based for-loop support</a></li> +<li><a href="#access.iterators">5.6. Traversing node/attribute lists via iterators</a></li> +<li><a href="#access.walker">5.7. Recursive traversal with xml_tree_walker</a></li> +<li><a href="#access.predicate">5.8. Searching for nodes/attributes with predicates</a></li> +<li><a href="#access.text">5.9. Working with text contents</a></li> +<li><a href="#access.misc">5.10. Miscellaneous functions</a></li> </ul> </li> <li><a href="#modify">6. Modifying document data</a> <ul class="sectlevel2"> -<li><a href="#modify.nodedata">Setting node data</a></li> -<li><a href="#modify.attrdata">6.1. Setting attribute data</a></li> -<li><a href="#modify.add">6.2. Adding nodes/attributes</a></li> -<li><a href="#modify.remove">6.3. Removing nodes/attributes</a></li> -<li><a href="#modify.text">6.4. Working with text contents</a></li> -<li><a href="#modify.clone">6.5. Cloning nodes/attributes</a></li> -<li><a href="#modify.move">6.6. Moving nodes</a></li> -<li><a href="#modify.fragments">6.7. Assembling document from fragments</a></li> +<li><a href="#modify.nodedata">6.1. Setting node data</a></li> +<li><a href="#modify.attrdata">6.2. Setting attribute data</a></li> +<li><a href="#modify.add">6.3. Adding nodes/attributes</a></li> +<li><a href="#modify.remove">6.4. Removing nodes/attributes</a></li> +<li><a href="#modify.text">6.5. Working with text contents</a></li> +<li><a href="#modify.clone">6.6. Cloning nodes/attributes</a></li> +<li><a href="#modify.move">6.7. Moving nodes</a></li> +<li><a href="#modify.fragments">6.8. Assembling document from fragments</a></li> </ul> </li> <li><a href="#saving">7. Saving document</a> @@ -689,7 +686,7 @@ No documentation is perfect; neither is this one. If you find errors or omission </div> <div class="literalblock"> <div class="content"> -<pre>Copyright (c) 2006-2017 Arseny Kapoulkine +<pre>Copyright (c) 2006-2018 Arseny Kapoulkine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -719,7 +716,7 @@ OTHER DEALINGS IN THE SOFTWARE.</pre> <div class="literalblock"> <div class="content"> <pre>This software is based on pugixml library (http://pugixml.org). -pugixml is Copyright (C) 2006-2017 Arseny Kapoulkine.</pre> +pugixml is Copyright (C) 2006-2018 Arseny Kapoulkine.</pre> </div> </div> </div> @@ -1973,7 +1970,7 @@ The current behavior for Unicode conversion is to skip all invalid UTF sequences <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++ 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><a class="link" href="#access.basic">Basic traversal functions</a></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> @@ -2030,7 +2027,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><a class="link" href="#access.nodedata">5.1. Getting node data</a></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’s name or value, you can use the following functions:</p> @@ -2065,7 +2062,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><a class="link" href="#access.attrdata">5.2. Getting attribute data</a></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> @@ -2154,7 +2151,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><a class="link" href="#access.contents">5.3. Contents-based traversal functions</a></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> @@ -2208,7 +2205,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><a class="link" href="#access.rangefor">5.4. Range-based for-loop support</a></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++ compiler supports range-based for-loop (this is a C++11 feature, at the time of writing it’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++11 foreach facilities.</p> @@ -2248,7 +2245,7 @@ If your C++ compiler supports range-based for-loop (this is a C++ </div> </div> <div class="sect2"> -<h3 id="access.iterators"><a class="anchor" href="#access.iterators"></a><a class="link" href="#access.iterators">5.5. Traversing node/attribute lists via iterators</a></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> @@ -2308,7 +2305,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><a class="link" href="#access.walker">5.6. Recursive traversal with xml_tree_walker</a></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’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> @@ -2376,7 +2373,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><a class="link" href="#access.predicate">5.7. Searching for nodes/attributes with predicates</a></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> @@ -2441,7 +2438,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><a class="link" href="#access.text">5.8. Working with text contents</a></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><node><description>This is a node</description></node></code>. In this case, <code><description></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> @@ -2519,7 +2516,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><a class="link" href="#access.misc">5.9. Miscellaneous functions</a></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> @@ -2583,7 +2580,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& 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><a class="link" href="#modify.nodedata">Setting node data</a></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’s name or value, you can use the following functions:</p> @@ -2618,7 +2615,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><a class="link" href="#modify.attrdata">6.1. Setting attribute data</a></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> @@ -2717,7 +2714,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><a class="link" href="#modify.add">6.2. Adding nodes/attributes</a></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’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> @@ -2812,7 +2809,7 @@ Nodes and attributes do not exist without a document tree, so you can’t cr </div> </div> <div class="sect2"> -<h3 id="modify.remove"><a class="anchor" href="#modify.remove"></a><a class="link" href="#modify.remove">6.3. Removing nodes/attributes</a></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> @@ -2874,7 +2871,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><a class="link" href="#modify.text">6.4. Working with text contents</a></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><node><description>This is a node</description></node></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> @@ -2943,7 +2940,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><a class="link" href="#modify.clone">6.5. Cloning nodes/attributes</a></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’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> @@ -3039,7 +3036,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><a class="link" href="#modify.move">6.6. Moving nodes</a></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> @@ -3076,7 +3073,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><a class="link" href="#modify.fragments">6.7. Assembling document from fragments</a></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> @@ -5675,7 +5672,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 2017-08-29 20:45:58 DST +Last updated 2018-01-07 20:28:02 STD </div> </div> </body> diff --git a/docs/quickstart.adoc b/docs/quickstart.adoc index b7cb3b8..f36d2ac 100644 --- a/docs/quickstart.adoc +++ b/docs/quickstart.adoc @@ -255,7 +255,7 @@ If filing an issue is not possible due to privacy or other concerns, you can con The pugixml library is distributed under the MIT license: .... -Copyright (c) 2006-2017 Arseny Kapoulkine +Copyright (c) 2006-2018 Arseny Kapoulkine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -283,5 +283,5 @@ This means that you can freely use pugixml in your applications, both open-sourc .... This software is based on pugixml library (http://pugixml.org). -pugixml is Copyright (C) 2006-2017 Arseny Kapoulkine. +pugixml is Copyright (C) 2006-2018 Arseny Kapoulkine. .... diff --git a/docs/quickstart.html b/docs/quickstart.html index fb7d379..d57cd85 100644 --- a/docs/quickstart.html +++ b/docs/quickstart.html @@ -1039,7 +1039,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample </div> <div class="literalblock"> <div class="content"> -<pre>Copyright (c) 2006-2017 Arseny Kapoulkine +<pre>Copyright (c) 2006-2018 Arseny Kapoulkine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -1069,7 +1069,7 @@ OTHER DEALINGS IN THE SOFTWARE.</pre> <div class="literalblock"> <div class="content"> <pre>This software is based on pugixml library (http://pugixml.org). -pugixml is Copyright (C) 2006-2017 Arseny Kapoulkine.</pre> +pugixml is Copyright (C) 2006-2018 Arseny Kapoulkine.</pre> </div> </div> </div> @@ -1083,7 +1083,7 @@ pugixml is Copyright (C) 2006-2017 Arseny Kapoulkine.</pre> </div> <div id="footer"> <div id="footer-text"> -Last updated 2017-12-22 10:40:20 STD +Last updated 2018-01-07 20:28:02 STD </div> </div> </body> |