Can Nokogiri retain attribute quoting style? <p>Here is the contents of my file (note the nested quotes):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;property name="eventData" value='{"key":"value"}'/&gt; </code></pre> <p>in Ruby I have:</p> <pre><code>file = File.read(settings.test_file) @xml = Nokogiri::XML( file) puts "@xml " + @xml.to_s </code></pre> <p>and here is the output:</p> <pre><code>&lt;property name="eventData" value="{&amp;quot;key&amp;quot;:&amp;quot;value&amp;quot;}"/&gt; </code></pre> <p>Is there a way to convert it so the output would preserve the quotes exactly? i.e. single on the outside, double on the inside?</p>