You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-03-29.19:55:45.681>created_at=<Date2020-03-29.19:13:13.542>labels= ['3.7', '3.8', 'type-bug', 'library', '3.9']
title='ElementTree does not find elements in a default namespace with namespaces'updated_at=<Date2020-03-29.19:55:45.681>user='https://github.com/myronww'
When you have an xml document like the one with a default namespace below. When you try to lookup nodes in the document they are not found.
docTree.find("specVersion")
None
If you add a namespaces map with the '' key and the default namespaces like:
{ '': 'urn:schemas-upnp-org:device-1-0' }
then the nodes are still not found. The issue is that there is a case
missing from xpath_tokenizer that does not yield a pair with the default namespace when one is specified. Here is a fix.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: