Re: minidom: Genius or just plain bad?

Philipp Hagemeister <[email protected]> Sun, 31 May 2009 00:43:44 +0200
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
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.

Cheers,

Philipp

_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkohtqMACgkQ9eq1gvr7CFz+LwCgoqFxZ0sTB6T+bGLKhbw2yrDB
wYcAn0rS1N+XXbA2SGkr3K4GrrrauUx7
=BFUv
-----END PGP SIGNATURE-----