How can I get the ElementTree.toString method to output
from a node's text attribute?
import xml.etree.cElementTree as ET
node = ET.Element("node")
node.text = "hello there"
print(ET.tostring(node, encoding = 'utf8', method = "xml", xml_declaration = False).decode('utf8'))
outputs:
<node>hello&nbsp;there</node>
But I would like it to recognise the
entity and output:
<node>hello there</node>