Stefan Behnel added the comment:

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".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18304>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to