diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-31 07:33:01 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-31 07:33:01 +0000 |
commit | 4920e4fec93b801410b85c894c292a8e982661ba (patch) | |
tree | 4b9d91d29875dc2ab8f09b214372a804f9c04acb /src/pugixml.cpp | |
parent | a73424aeffa5bbdf36c610dae96cd28dc81f4e66 (diff) |
Added xml_document::reset() function with document parameter
git-svn-id: http://pugixml.googlecode.com/svn/trunk@786 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r-- | src/pugixml.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 6850589..ff5aaa9 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4505,6 +4505,14 @@ namespace pugi create(); } + void xml_document::reset(const xml_document& proto) + { + reset(); + + for (xml_node cur = proto.first_child(); cur; cur = cur.next_sibling()) + append_copy(cur); + } + void xml_document::create() { // initialize sentinel page |