[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

Raymond Hettinger report at bugs.python.org
Fri Apr 18 03:12:08 CEST 2014


Raymond Hettinger added the comment:

FWIW, I would like to have a way to ignore namespaces.

For many day-to-day problems (parsing Microsoft Excel
files saved in an XML format or parsing RSS feeds),
this would be a nice simplification.

I teach Python for a living and have found that it is
common for namespaces to be an obstacle for people
trying to get something done.

Giving them the following answer is unsatisfactory response to legitimate needs: 
"""
And it's pretty trivial to pre-process the entire tree by stripping all namespaces from it the intention is really to do namespace agnostic processing. However, in my experience, most people who want to do that haven't actually understood namespaces (although, admittedly, sometimes it's those who designed the XML format who didn't understand namespaces ...).
"""

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18304>
_______________________________________


More information about the Python-bugs-list mailing list