amandawhite
New Member
I have an existing Nokogiri builder and some xml nodes in a string from a different source. How can I add this string to my builder?\[code\]str = "<options><cc>true</cc></options>"xml = Nokogiri::XML::Builder.new do |q| q.query do |f| f.name "awesome" f.filter str endend\[/code\]This escapes str into something like:\[code\]xml.to_xml=> "<?xml version=\"1.0\"?>\n<query>\n <name>awesome</name>\n <filter><options><cc>true</cc></options></filter>\n</query>\n"\[/code\]I have found many, many similar things, including nesting builders and using the << operator, but nothing works to insert a full xml node tree into a builder block.How can I make that string into real nodes?