This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scoder
Recipients brycenesbitt, eli.bendersky, scoder
Date 2013-08-12.04:34:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376282067.66.0.210422265341.issue18304@psf.upfronthosting.co.za>
In-reply-to
Content
As I already suggested for lxml, you can use the QName class to process qualified names, e.g.

    QName(some_element.tag).localname

Or even just

    QName(some_element).localname

It appears that ElementTree doesn't support this. It lists the QName type as "opaque". However, it does provide a "text" attribute that contains the qualified tag name.

http://docs.python.org/2/library/xml.etree.elementtree.html#xml.etree.ElementTree.QName

Here is the corresponding documentation from lxml:

http://lxml.de/api/lxml.etree.QName-class.html

QName instances in lxml provide the properties "localname", "namespace" and "text".
History
Date User Action Args
2013-08-12 04:34:27scodersetrecipients: + scoder, eli.bendersky, brycenesbitt
2013-08-12 04:34:27scodersetmessageid: <1376282067.66.0.210422265341.issue18304@psf.upfronthosting.co.za>
2013-08-12 04:34:27scoderlinkissue18304 messages
2013-08-12 04:34:27scodercreate