From a15efb2def59dd3e9f8c88ff2f2167482b47a380 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 10 Aug 2014 23:52:49 +0000 Subject: 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 --- src/pugixml.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pugixml.hpp') 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); -- cgit v1.2.3