XML: minidom and problem with getElementsByTagName()

Martin v. Loewis martin at v.loewis.de
Sat May 4 03:06:18 EDT 2002


> Can I make minidom for getting childeren nodes without recursion? Do
> getElementsByTagName() method works always with recursion???

Yes, this is how the W3C specified this method, see

http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-A6C9094

If you are only interested in immediate child nodes, I recommend you
iterate over childNodes.

HTH,
Martin



More information about the Python-list mailing list