bpo-34160: Preserve order of attributes in minidom. (GH-10219)

This commit is contained in:
Diego Rojas 2018-11-07 09:09:04 -05:00 committed by Serhiy Storchaka
parent f194479949
commit 5598cc90c7
4 changed files with 34 additions and 3 deletions

View file

@ -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("\"")