tags:

views:

132

answers:

1

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"?>

A: 

.toprettyxml() has an encoding keyword argument:

Document.toprettyxml(self, indent='\t', newl='\n', encoding=None)
kaizer.se