Hello I'm trying to read an xml file using minidome. The xml looks like:<br><rootNode><br> <project><br> <name>myProj</name><br> <path>/here/</path><br> </project><br>
</rootNode><br><br>My code looks like so:<br>from xml.dom.minidom import parse<br><br>dom = parse("myfile.xml")<br><br>for node in dom.getElementsByTagName("project'):<br> print('name: %s, path: %s \n') % (node.childNodes[0].nodeValue, node.childNodes[1])<br>
<br>Unfortunately, it returns 'nodeValue as none. I'm trying to read the value out of the node fir example name: myProj. I haven't found much help in the documentation. Can someone point me in the right direction?<br>
<pre><span class="kn"></span><span class="nn"></span><span class="kn"></span><span class="n"></span><span class="p"></span><span class="n"></span><br></pre>