From 5624befce1d64824efe7f57ef02b62a7be934404 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Tue, 20 Oct 2009 19:21:34 +0000 Subject: Fixed node_pi and node_declaration copying git-svn-id: http://pugixml.googlecode.com/svn/trunk@160 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index c309544..1061447 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -1668,13 +1668,20 @@ namespace case node_pcdata: case node_cdata: case node_comment: + dest.set_value(source.value()); + break; + case node_pi: + dest.set_name(source.name()); dest.set_value(source.value()); break; case node_declaration: dest.set_name(source.name()); - dest.set_value(source.value()); + + for (xml_attribute a = source.first_attribute(); a; a = a.next_attribute()) + dest.append_attribute(a.name()).set_value(a.value()); + break; default: -- cgit v1.2.3