##// END OF EJS Templates
IO_Writer: default datatype was changed to 3 (int32), instead of 2 (int16).
IO_Writer: default datatype was changed to 3 (int32), instead of 2 (int16).

File last commit:

r208:f0e2ebb4337f
r626:33eeed5c06a1
Show More
xmlprint.py
13 lines | 368 B | text/x-python | PythonLexer
'''
Created on Septembre, 2012
@author: roj-idl71
'''
from xml.etree import ElementTree
from xml.dom import minidom
def prettify(elem):
"""Return a pretty-printed XML string for the Element.
"""
rough_string = ElementTree.tostring(elem, 'utf-8')
reparsed = minidom.parseString(rough_string)
return reparsed.toprettyxml(indent=" ")