Re: etree, lxml unexpected behaviour

2009-06-19 Thread Emanuele D'Arrigo
Thank you for the clarification Stefan, I understand. -- http://mail.python.org/mailman/listinfo/python-list

Re: etree, lxml unexpected behaviour

2009-06-17 Thread Stefan Behnel
Emanuele D'Arrigo wrote: > Hi everybody, I just tried the following: > import xml.etree.ElementTree as etree e = etree.fromstring('>>> xmlns:ans="anotherNamespace" ans:anotherAttr="2"/>') e.getchildren()[0].attrib > {'anAttr': '1', '{anotherNamespace}anotherAttr': '2'} > > Noti

etree, lxml unexpected behaviour

2009-06-17 Thread Emanuele D'Arrigo
Hi everybody, I just tried the following: >>> import xml.etree.ElementTree as etree >>> e = etree.fromstring('>> xmlns:ans="anotherNamespace">>> ans:anotherAttr="2"/>') >>> e.getchildren()[0].attrib {'anAttr': '1', '{anotherNamespace}anotherAttr': '2'} Notice the lack of namespace before the attr