lib/dm-serializer/xml_serializers/libxml.rb in dm-serializer-0.9.11 vs lib/dm-serializer/xml_serializers/libxml.rb in dm-serializer-0.10.0
- old
+ new
@@ -20,9 +20,14 @@
node = ::LibXML::XML::Node.new(name, value_str)
attrs.each do |attr_name, attr_val|
node[attr_name] = attr_val
end
parent << node
+ node
+ end
+
+ def self.add_xml(parent, xml)
+ parent << xml.root.copy(true)
end
def self.output(doc)
doc.root.to_s
end