All I want to do is get the content of an XML tag in Python. I'm maybe using the wrong import; ideally I'd love to have the way PHP deals with XML (i.e $XML->this_tag), like the way pyodbc does database stuff (i.e. table.field)
Here's my example:
from xml.dom.minidom import parseString
dom = parseString("<test>I want to read this</test>")
dom.getElementsByTagName("test")[0].toxml()
>>> u'<test>I want to read this</test>'
All I want to be able to do read the contents of the tag (like innerHTML in javascript).
dom.getElementsByTagName("test")[0].firstChild().toxml()