How would you do something like the following for adding a small tree
of xml nodes to a parent node?
xml = Nokogiri::XML(<<-eoxml) { |c| c.noblanks }
<root xmlns="
http://tenderlovemaking.com/" xmlns:foo="bar">
<awesome/>
</root>
eoxml
I would like to be able to do something like this:
node = Nokogiri::XML::Node(<<-eoxml) { |c| c.noblanks }
<aNode>
<subNode>
<subSubNode attributeA="value"/>
<subSubNode/>
</subNode>
</aNode>
eoxml
parent.add_child(node)
Is that possible? Or what is the best way to accomplish that,
assuming the "parent" variable is a parent 3 elements deep or whatever
(aka it isn't the document)?
Thanks so much for your help,
Lance