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>
<?xml version="1.0" encoding="iso-8859-1"?><br>
<br>
However, my goal is to have the XML declaration look like the following:<br>
<span><?</span><span>xml version="1.0" encoding="iso-8859-1"
standalone="no" </span><span>?><br>
<br>
The following link mentions "standalone" 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>