July 24th, 2013, 01:36 AM
Skipping tag in xml reading using python
I am parsing xml file using minidom in python.
I want to skip a tag in it because when I try to getElementsByTagName it is giving me error as "connectors=schview.getElementsByTagName("connectors")
IndexError: list index out of range"
The problem is this tag is not present in one of schview hence this error.
If I remove that one tag then I can easily process,but I want a way to skip that tag rather then removing it manually.
Thanks and Regards