What would you use to modify the XML file, preserving as much layout as possible, including indentation and comments?
My problem is that I have several massive manually edited XML files that describe the user interface, and now I need to translate several attributes into another language.
I tried doing this with Python + ElementTree, but it did not save any spaces or comments.
I saw that XSLT is suggested for similar questions, but I donβt think it is an alternative in this case, since I need to do some logic and search for each attribute.
It would be preferable if the order of the attributes in each element is also preserved, but I can tolerate the reordered order.
source share