Extracting node reference ID using minidom in Python

nyqnzgujuxx

New Member
I am using minidom in Python and I would like to search through a list of nodes (book) and for each book node where the attribute "name" is equal to "statistics", I want to print the node reference. Here is an example of an XML-file that I would like to process:\[code\]<book id='123'> <name>statistics</name></book><book id='234'> <name>mathematics</name></book><book id='345'> <name>statistics</name></book>\[/code\]Desired output is:\[code\]123345\[/code\]Any ideas on how I can achieve this?
 
Back
Top