mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-34160: Preserve order of attributes in minidom. (GH-10219)
This commit is contained in:
parent
f194479949
commit
5598cc90c7
4 changed files with 34 additions and 3 deletions
|
@ -854,9 +854,8 @@ class Element(Node):
|
|||
writer.write(indent+"<" + self.tagName)
|
||||
|
||||
attrs = self._get_attributes()
|
||||
a_names = sorted(attrs.keys())
|
||||
|
||||
for a_name in a_names:
|
||||
for a_name in attrs.keys():
|
||||
writer.write(" %s=\"" % a_name)
|
||||
_write_data(writer, attrs[a_name].value)
|
||||
writer.write("\"")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue