Get element by name : XML Element « XML « Python






Get element by name




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

           
       








Related examples in the same category

1.Every Element Is Searchable
2.Searching Is Actually Recursive
3.Searching for XML Elements