Title: Minidom, order of attributes, datachars
Type: enhancement Stage: resolved
Components: XML Versions: Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: ElementTree not preserving attribute order
View: 34160
Assigned To: Nosy List: Petr Pulc, scoder
Priority: normal Keywords:

Created on 2016-10-17 12:44 by Petr Pulc, last changed 2019-04-27 15:10 by scoder. This issue is now closed.

Messages (2)
msg278804 - (view) Author: Petr Pulc (Petr Pulc) Date: 2016-10-17 12:44
just an idea for improvement of minidom.

Sometimes it is not convenient that the element attributes are sorted alphabetically.

Usually, users do hack the minidom file themselves to force some behaviour, yet the order can be quite nicely defined by the DTD, for example.

More on the "issue" side is another idea for improvement. Not all special characters do need to be changed to entities. For example, only < needs to be changed to entity in text data. I guess, that the _write_data function could be then diminished as well...

What do you mean of these two ideas? Comments will be appreciated.
msg340989 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2019-04-27 15:10
I'll close this as a duplicate of issue 34160.

I'm aware that you also proposed to reduce the text escaping, but it's still needed for attribute values. Not sure if it's really worth having two different escape functions. Feel free to provide a PR and create a new ticket for this, so that we can discuss a specific change proposal. It's not good to discuss more than one topic per ticket.
Date User Action Args
2019-04-27 15:10:57scodersetstatus: open -> closed
resolution: duplicate
stage: resolved
2019-04-27 15:10:39scodersetsuperseder: ElementTree not preserving attribute order

messages: + msg340989
nosy: + scoder
2016-10-17 12:44:58Petr Pulccreate