git clone https://github.com/zeux/pugixml
cd pugixml
-git checkout v1.10
+git checkout v1.11
diff --git a/CMakeLists.txt b/CMakeLists.txt index fda789c..96c0160 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.4) -project(pugixml VERSION 1.10 LANGUAGES CXX) +project(pugixml VERSION 1.11 LANGUAGES CXX) include(CMakePackageConfigHelpers) include(CMakeDependentOption) diff --git a/docs/manual.adoc b/docs/manual.adoc index c566673..f82b82f 100644 --- a/docs/manual.adoc +++ b/docs/manual.adoc @@ -2138,6 +2138,24 @@ Because of the differences in document object models, performance considerations :!numbered: +[[v1.11]] +=== v1.11 ^2020-11-26^ + +Maintenance release. Changes: + +* New features: + . Add xml_node::remove_attributes and xml_node::remove_children + . Add a way to customize floating point precision via xml_attribute::set and xml_text::set overloads + +* XPath improvements: + . XPath parser now limits recursion depth which prevents stack overflow on malicious queries + +* Compatibility improvements: + . Fix Visual Studio warnings when built using clang-cl compiler + . Fix Wconversion warnings in gcc + . Fix Wzero-as-null-pointer-constant warnings in pugixml.hpp + . Work around several static analysis false positives + [[v1.10]] === v1.10 ^2019-09-15^ diff --git a/docs/manual.html b/docs/manual.html index 4a1d501..91bbbda 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -2,22 +2,21 @@
- + - + -You can download the latest source distribution as an archive:
pugixml-1.10.zip (Windows line endings) +
pugixml-1.11.zip (Windows line endings) / -pugixml-1.10.tar.gz (Unix line endings)
+pugixml-1.11.tar.gz (Unix line endings)The distribution contains library source, documentation (the manual you’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.
@@ -773,7 +709,7 @@ pugixml is Copyright (C) 2006-2019 Arseny Kapoulkine.git clone https://github.com/zeux/pugixml
cd pugixml
-git checkout v1.10
+git checkout v1.11
svn checkout https://github.com/zeux/pugixml/tags/v1.10 pugixml
+svn checkout https://github.com/zeux/pugixml/tags/v1.11 pugixml
pugixml.cpp(3477) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?+
pugixml.cpp(3477) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
PUGIXML_API is inconsistent between several source
Document node (node_document) - this is the root of the tree, which consists of several child nodes. This node corresponds to xml_document class; note that xml_document is a sub-class of xml_node, so the entire node interface is also available. However, document node is special in several ways, which are covered below. There can be only one document node in the tree; document node does not have any XML representation.
Document node (node_document) - this is the root of the tree, which consists of several child nodes. This node corresponds to xml_document class; note that xml_document is a sub-class of xml_node, so the entire node interface is also available. However, document node is special in several ways, which are covered below. There can be only one document node in the tree; document node does not have any XML representation. Document generally has one child element node (see document_element()), although documents parsed from XML fragments (see parse_fragment) can have more than one.
Element/tag node (node_element) - this is the most common type of node, which represents XML elements. Element nodes have a name, a collection of attributes and a collection of child nodes (both of which may be empty). The attribute is a simple name/value pair. The example XML representation of element nodes is as follows:
<node attr="value"><child/></node>+
<node attr="value"><child/></node>
PUGIXML_API is inconsistent between several source
Plain character data nodes (node_pcdata) represent plain text in XML. PCDATA nodes have a value, but do not have a name or children/attributes. Note that plain character data is not a part of the element node but instead has its own node; an element node can have several child PCDATA nodes. The example XML representation of text nodes is as follows:
<node> text1 <child/> text2 </node>+
<node> text1 <child/> text2 </node>
PUGIXML_API is inconsistent between several source
Character data nodes (node_cdata) represent text in XML that is quoted in a special way. CDATA nodes do not differ from PCDATA nodes except in XML representation - the above text example looks like this with CDATA:
<node> <![CDATA[text1]]> <child/> <![CDATA[text2]]> </node>+
<node> <![CDATA[text1]]> <child/> <![CDATA[text2]]> </node>
PUGIXML_API is inconsistent between several source
Comment nodes (node_comment) represent comments in XML. Comment nodes have a value, but do not have a name or children/attributes. The example XML representation of a comment node is as follows:
<!-- comment text -->+
<!-- comment text -->
PUGIXML_API is inconsistent between several source
Processing instruction node (node_pi) represent processing instructions (PI) in XML. PI nodes have a name and an optional value, but do not have children/attributes. The example XML representation of a PI node is as follows:
<?name value?>+
<?name value?>
PUGIXML_API is inconsistent between several source
Declaration node (node_declaration) represents document declarations in XML. Declaration nodes have a name ("xml") and an optional collection of attributes, but do not have value or children. There can be only one declaration node in a document; moreover, it should be the topmost node (its parent should be the document). The example XML representation of a declaration node is as follows:
<?xml version="1.0"?>+
<?xml version="1.0"?>
PUGIXML_API is inconsistent between several source
Document type declaration node (node_doctype) represents document type declarations in XML. Document type declaration nodes have a value, which corresponds to the entire document type contents; no additional nodes are created for inner elements like <!ENTITY>. There can be only one document type declaration node in a document; moreover, it should be the topmost node (its parent should be the document). The example XML representation of a document type declaration node is as follows:
<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]>+
<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]>
parse_fragment 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 off by default.
parse_fragment 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 and permits multiple top-level element nodes. This flag is off by default.
Unicode validation is not performed so invalid UTF sequences are not rejected.
Document can contain multiple top-level element nodes.
+If you do not want your document to contain some node or attribute, you can remove it with one of the following functions:
bool xml_node::remove_attribute(const xml_attribute& a);
-bool xml_node::remove_child(const xml_node& n);
+bool xml_node::remove_attributes();
+bool xml_node::remove_child(const xml_node& n);
+bool xml_node::remove_children();
remove_attribute removes the attribute from the attribute list of the node, and returns the operation result. remove_child removes the child node with the entire subtree (including all descendant nodes and attributes) from the document, and returns the operation result. Removing fails if one of the following is true:
remove_attribute removes the attribute from the attribute list of the node, and returns the operation result. remove_child removes the child node with the entire subtree (including all descendant nodes and attributes) from the document, and returns the operation result. remove_attributes removes all the attributes of the node, and returns the operation result. remove_children removes all the child nodes of the node, and returns the operation result. Removing fails if one of the following is true:
Maintenance release. Changes:
+New features:
+Add xml_node::remove_attributes and xml_node::remove_children
+Add a way to customize floating point precision via xml_attribute::set and xml_text::set overloads
+XPath improvements:
+XPath parser now limits recursion depth which prevents stack overflow on malicious queries
+Compatibility improvements:
+Fix Visual Studio warnings when built using clang-cl compiler
+Fix Wconversion warnings in gcc
+Fix Wzero-as-null-pointer-constant warnings in pugixml.hpp
+Work around several static analysis false positives
+Maintenance release. Changes:
@@ -5641,8 +5638,10 @@ If exceptions are disabled, then in the event of parsing failure the query is in bool remove_attribute(const xml_attribute& a); bool remove_attribute(const char_t* name); + bool remove_attributes(); bool remove_child(const xml_node& n); bool remove_child(const char_t* name); + bool remove_children(); xml_parse_result append_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); @@ -5862,8 +5861,79 @@ If exceptions are disabled, then in the event of parsing failure the query is inYou can download the latest source distribution as an archive:
pugixml-1.10.zip (Windows line endings) +
pugixml-1.11.zip (Windows line endings) / -pugixml-1.10.tar.gz (Unix line endings)
+pugixml-1.11.tar.gz (Unix line endings)The distribution contains library source, documentation (the guide you’re reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.
@@ -1095,8 +1030,79 @@ pugixml is Copyright (C) 2006-2019 Arseny Kapoulkine.