summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pugixml.cpp9
1 files changed, 8 insertions, 1 deletions
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: