summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom/minidom.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2000-10-06 22:36:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2000-10-06 22:36:03 (GMT)
commit2c8a89cc3f141f574982b66383c533e7ecbe4aac (patch)
treed4607b60d442682ec54433daad215a1c5c4de8c9 /Lib/xml/dom/minidom.py
parent80670bcabaf071bfe9131f3907b44632a672f9cb (diff)
downloadcpython-2c8a89cc3f141f574982b66383c533e7ecbe4aac.zip
cpython-2c8a89cc3f141f574982b66383c533e7ecbe4aac.tar.gz
cpython-2c8a89cc3f141f574982b66383c533e7ecbe4aac.tar.bz2
minidom: access attribute value before printing it
correct order of constructor args in createAttributeNS pulldom: use symbolic names for uri and localnames correct usage of createAttribute and setAttributeNode signatures.
Diffstat (limited to 'Lib/xml/dom/minidom.py')
-rw-r--r--Lib/xml/dom/minidom.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 80771ad..7d610c6 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -331,7 +331,7 @@ class Element( Node ):
for a_name in a_names:
writer.write(" %s=\"" % a_name)
- _write_data(writer, self._get_attributes()[a_name])
+ _write_data(writer, self._get_attributes()[a_name].value)
writer.write("\"")
if self.childNodes:
writer.write(">")
@@ -429,7 +429,7 @@ class Document(Node):
def createAttributeNS(self, namespaceURI, qualifiedName):
prefix,localName = _nssplit(qualifiedName)
- return Attr(namespaceURI, qualifiedName, localName, prefix)
+ return Attr(qualifiedName, namespaceURI, localName, prefix)
def getElementsByTagNameNS(self, namespaceURI, localName):
_getElementsByTagNameNSHelper(self, namespaceURI, localName)