Mega Code Archive

 
Categories / Python / XML
 

Get element by name

from xml.dom import minidom  xmldoc = minidom.parse('sample.xml')  title = xmldoc.getElementsByTagName('title')[0].firstChild.data