diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-26 17:09:34 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-26 17:09:34 +0000 |
commit | 09b5dfdcb0707c39874997efbf207ff554334c34 (patch) | |
tree | 6f1ec740a22d766a419574e95122aa7322342179 /src/pugixml.hpp | |
parent | 948cb037aec073255d71a19ae1f9f5a351deff72 (diff) |
Added xml_document::reset, added append/prepend/insert child overloads for elements (with explicit name)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@779 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r-- | src/pugixml.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 63e0233..ce4abe2 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -428,6 +428,12 @@ namespace pugi xml_node insert_child_after(xml_node_type type, const xml_node& node); xml_node insert_child_before(xml_node_type type, const xml_node& node); + // Add child element with specified name. Returns added node, or empty node on errors. + xml_node append_child(const char_t* name); + xml_node prepend_child(const char_t* name); + xml_node insert_child_after(const char_t* name, const xml_node& node); + xml_node insert_child_before(const char_t* name, const xml_node& node); + // Add a copy of the specified node as a child. Returns added node, or empty node on errors. xml_node append_copy(const xml_node& proto); xml_node prepend_copy(const xml_node& proto); @@ -719,7 +725,6 @@ namespace pugi xml_document(const xml_document&); const xml_document& operator=(const xml_document&); - void reset(); void create(); void destroy(); @@ -732,6 +737,9 @@ namespace pugi // Destructor, invalidates all node/attribute handles to this document ~xml_document(); + // Removes all nodes, leaving the empty document + void reset(); + #ifndef PUGIXML_NO_STL // Load document from stream. xml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); |