diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-08-10 23:52:49 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-08-10 23:52:49 +0000 |
commit | a15efb2def59dd3e9f8c88ff2f2167482b47a380 (patch) | |
tree | eb4e5f5e1374c5dbee35568e75ab58a37bd4db1c /src/pugixml.hpp | |
parent | 0e16e450492fbbe8cc2e17acb018dccac8ec98a5 (diff) |
Implement node moving functions.
The operations itself are O(1) since they just rearrange pointers.
However, the validation step is O(logN) due to a sanity check to prevent recursive trees.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1002 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r-- | src/pugixml.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index c15e5a1..69b2cb2 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -501,6 +501,12 @@ namespace pugi xml_node insert_copy_after(const xml_node& proto, const xml_node& node); xml_node insert_copy_before(const xml_node& proto, const xml_node& node); + // Move the specified node to become a child of this node. Returns moved node, or empty node on errors. + xml_node append_move(const xml_node& moved); + xml_node prepend_move(const xml_node& moved); + xml_node insert_move_after(const xml_node& moved, const xml_node& node); + xml_node insert_move_before(const xml_node& moved, const xml_node& node); + // Remove specified attribute bool remove_attribute(const xml_attribute& a); bool remove_attribute(const char_t* name); |