I created a xml.dom.minidom.Document
.
How do I give it attributes so that when I do .toprettyxml()
it will show like this:
<?xml version="1.0" encoding="iso-8859-2"?>
I created a xml.dom.minidom.Document
.
How do I give it attributes so that when I do .toprettyxml()
it will show like this:
<?xml version="1.0" encoding="iso-8859-2"?>
.toprettyxml()
has an encoding keyword argument:
Document.toprettyxml(self, indent='\t', newl='\n', encoding=None)