xml getElementsByTagName w/o recursion?

Simon Dahlbacka sdahlbac at abo.fi
Wed Feb 11 12:36:40 CET 2004


this is perhaps not directly a python question, but how do I get a
direct child element without going down the tree and possibly find
another element with the same name there?

  <name>This is the interesting part</name>
   <name>this is what I DO NOT want</nameA

I am using xml.dom.minidom and I was thinking along the line of

but that doesn't work..

is the only solution to write an own helper function that iterates the
child nodes and get the correct one?


More information about the Python-list mailing list