from xml.dom import minidom contents = "<grammar><ref id='bit'><para>0</para><para>1</para></ref></grammar>" xmldoc = minidom.parseString(contents) print xmldoc.toxml()
Name (required)
email (will not be published) (required)
Website