Searching for XML Elements : XML Element « XML « Python






Searching for XML Elements

from xml.dom import minidom 
xmldoc = minidom.parse('binary.xml') 
reflist = xmldoc.getElementsByTagName('ref')      
reflist 

print reflist[0].toxml() 

           
       








Related examples in the same category

1.Get element by name
2.Every Element Is Searchable
3.Searching Is Actually Recursive