Remove usage of deprecated getchildren() method.

This commit is contained in:
Lance Stout
2012-06-19 09:47:31 -07:00
parent 8119551049
commit 7858d969d8
11 changed files with 27 additions and 28 deletions

View File

@@ -77,10 +77,10 @@ class MatchXPath(MatcherBase):
# Skip empty tag name artifacts from the cleanup phase.
continue
children = [c.tag.split('}')[-1] for c in xml.getchildren()]
children = [c.tag.split('}')[-1] for c in xml]
try:
index = children.index(tag)
except ValueError:
return False
xml = xml.getchildren()[index]
xml = list(xml)[index]
return True