Hello friends, I have a small problem with creating XML documents. After creating the XML when I try to get a XML document as string using .toxml() or .toprettyxml() functions i got escaped string.
>>> from xml.dom.minidom import Document
>>> html = '<a href="http://www.google.com/">Google</a>'
>>> doc = Document()
>>> text = doc.createTextNode(html)
>>> text.data
'<a href="http://www.google.com/">Google</a>'
>>> text.toxml()
'<a href="http://www.google.com/">Google</a>'
# escaped string
So, my question is how to get the XML document as not escaped string using .toxml(encoding) ?
Thanks.