I know this question has been asked in the past, but they have all been dated a few years back. I am wondering if there has been any changes made to Python modules such as lxml,
The insignificance of attribute ordering is not a technical limitation to be lifted in future implementations of XML libraries.
Attribute order is insignificant per the XML Recommendation:
Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.
Thus, you should not base your design upon any particular ordering of attributes in XML.
In the very rare circumstances where an application absolutely must order XML attributes, see the section on attribute processing in the XML Normalization Recommendation or the Canonical XML Recommendation.