I'm trying to learn about Python and XML.  I would like to be able
to add standalone="no" to my xml declaration when writing an xml file,
but I am unable to figure out how.  So far, I have the following
code:<br>

<br>

import xml.dom.minidom<br>

doc2 = xml.dom.minidom.Document()<br>

print doc2.toxml('iso-8859-1')<br>

<br>

Which produces the following XML declaration:<br>

&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;<br>

<br>

However, my goal is to have the XML declaration look like the following:<br>

<span>&lt;?</span><span>xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; 
standalone=&quot;no&quot; </span><span>?&gt;<br>
<br>
The following link mentions &quot;standalone&quot; as a Document class variable,
but I am unsure how to make this work or even if I am on the right
track.<br>
<a href="http://epydoc.sourceforge.net/stdlib/private/_xmlplus.dom.minidom.Document-class.html#encoding" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://epydoc.sourceforge.net/stdlib/private/_xmlplus.dom.minidom.Document-class.html#encoding
</a><br>
<br>
Any help would be greatly appreciated.<br>
<br>
Thanks.</span>