Python 3 fix for the writing out of XML formatted state and results files.
In Python 3, the xmldoc.toprettyxml() returns a string object which needs to be 'encoded' prior to writing out to file.
Authored by: bugman 2012-10-02
Parent: [r17680]
Child: [r17682]