mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Fix Issue10205 - XML QName error when different tags have same QName.
This commit is contained in:
parent
92665ab8c7
commit
ec30b3dd8c
2 changed files with 8 additions and 2 deletions
|
@ -913,8 +913,9 @@ def _namespaces(elem, default_namespace=None):
|
|||
iterate = elem.getiterator # cET compatibility
|
||||
for elem in iterate():
|
||||
tag = elem.tag
|
||||
if isinstance(tag, QName) and tag.text not in qnames:
|
||||
add_qname(tag.text)
|
||||
if isinstance(tag, QName):
|
||||
if tag.text not in qnames:
|
||||
add_qname(tag.text)
|
||||
elif isinstance(tag, str):
|
||||
if tag not in qnames:
|
||||
add_qname(tag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue