[XML-SIG] Missing encoding attribute

Hashemian, Mehdi mehdi.hashemian at spirentcom.com
Thu Aug 12 18:34:30 CEST 2004


My problem: when creating a new XML document, my output document is missing
"encoding" attribute:
<?xml version="1.0" ?> instead of <?xml version="1.0" encoding="UTF-8"?>
 
Linux RedHat 9.0
Python 2.2.2
 
import xml.dom.minidom
impl = xml.dom.minidom.getDOMImplementation()
newDoc = impl.createDocument(None, u'mytag', None)
 
Questions:
 
Is there support for encoding argument for toxml and toprettyxml in minidom?
(Does not look like it is supported in 2.2.2)
Is there any other way (other than creating a wrapper around these
functions) to solve this problem?
 
Thanks!
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/xml-sig/attachments/20040812/d3bbab26/attachment.html


More information about the XML-SIG mailing list