Author dillona
Recipients dillona, docs@python
Date 2011-10-08.04:19:34
SpamBayes Score 0.00280871
Marked as misclassified No
Message-id <1318047575.12.0.0784977708118.issue13127@psf.upfronthosting.co.za>
In-reply-to
Content
The behavior can be verified as follows. Notice that despite changing the value, the output XML does not change

>>> from xml.dom import minidom, Node
>>> a = minidom.parseString("<a href=\"http://asd.com\">asd</a>")
>>> a
<xml.dom.minidom.Document instance at 0x22d7c68>
>>> a.childNodes
[<DOM Element: a at 0x22d7d88>]
>>> a.childNodes[0]
<DOM Element: a at 0x22d7d88>
>>> a.childNodes[0].attributes
<xml.dom.minidom.NamedNodeMap object at 0x21caa70>
>>> a.childNodes[0].attributes.item(0)
<xml.dom.minidom.Attr instance at 0x22d7f38>
>>> a.childNodes[0].attributes.item(0).name
u'href'
>>> attr = a.childNodes[0].attributes.item(0)
>>> attr.name = "ad"
>>> a.toxml()
u'<?xml version="1.0" ?><a href="http://asd.com">asd</a>'
>>> attr.value = "asd"
>>> a.toxml()
u'<?xml version="1.0" ?><a href="asd">asd</a>'
History
Date User Action Args
2011-10-08 04:19:35dillonasetrecipients: + dillona, docs@python
2011-10-08 04:19:35dillonasetmessageid: <1318047575.12.0.0784977708118.issue13127@psf.upfronthosting.co.za>
2011-10-08 04:19:34dillonalinkissue13127 messages
2011-10-08 04:19:34dillonacreate