[XML-SIG] minidom: Genius or just plain bad?

"Martin v. Löwis" martin at v.loewis.de
Sun May 31 00:30:29 CEST 2009


Philipp Hagemeister wrote:
> I was puzzled when I tripped over the following:
> 
>>>> NS = 'http://phihag.de/2009/test/python/ns'
>>>> s = '<rootelem a="val" xmlns="' + NS + '" />'
>>>> import xml.dom.minidom
>>>> doc = xml.dom.minidom.parseString(s)
>>>> doc.documentElement.getAttributeNS(NS, 'a')
> '' # wtf?

Why do you think this is incorrect? The root element
has no attribute named 'a' in the NS namespace.

Regards,
Martin


More information about the XML-SIG mailing list