<xmlnode id=2 text='"Hello World!"' />
How do i read the "Hello World" without unescaping in python. I'm using ElementTree like this
xmlstr = """\
<?xml version="1.0" encoding="utf-8"?>
<nodes>
<xmlnode id=1 text='"Hello World!"' />
<xmlnode id=2 text='"Hello World!"' />
</nodes>
"""
elem = ElementTree.fromstring(xmlstr)
nodes = elem.findall('xmlnode')
for row in nodes:
print str(row.get('id'))+ ": " + row.get('text')
output
1: "Hello World"
2: "Hello World"
I want
1: "Hello World"
2: "Hello World"