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

Philipp Hagemeister phihag at phihag.de
Sun May 31 00:43:44 CEST 2009

Martin v. Löwis wrote:
>>>>> 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')
> Why do you think this is incorrect? The root element
> has no attribute named 'a' in the NS namespace.

Oops, my bad. You are perfectly right, and this part of my argument is
moot. http://www.rpbourret.com/xml/NamespaceMyths.htm#myth4 refutes my
misconception in-depth.

minidom's code is still yucky though.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/xml-sig/attachments/20090531/466dc710/attachment.pgp>

More information about the XML-SIG mailing list