<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: append code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 11 Oct 2008 13:25:42 GMT</pubDate>
    <description>DZone Snippets: append code</description>
    <item>
      <title>Append an XML element using the append operator</title>
      <link>http://snippets.dzone.com/posts/show/5382</link>
      <description>This Ruby code appends an XML node to an XML document using the append &lt;&lt; operator. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;      doc2 = Document.new(xml_svg)&lt;br /&gt;      obody.text = ''&lt;br /&gt;      obody &lt;&lt; doc2.root&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;In this example the original obody.text contained escaped xml, which was then initialised as an XML document and appended to obody to be processed as pure XML.</description>
      <pubDate>Thu, 17 Apr 2008 23:50:25 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5382</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
  </channel>
</rss>
