Good evening, i have to work on a xml file, the problem is that the elements in the file ends with a different format than usual, for example:
<1ELEMENT>
text
<\1ELEMENT>
I use the function root=etree.parse('filepath'), and, by changing manually in the text out of the compiler the \ in /, the function works correctly.
The big problem is that i need to automate that replacing process and the only solution that i thinked about is importing the file as array make a replace / to \ and build a new xml file;but it seems a little bit clunky.
Summing up i need to know if exist a function to replace the terms i mentioned above before to use the root=etree.parse('filepath').
You could 

load the file
do the replacement, e.g. 
string_containing_modified_data = data_as_string.replace('\\>', '/>')
use etree.fromstring(string_containing_modified_data) to parse the xml.

If possible, you should try to fix the writer, but I understand if you don't have the opportunity to do so.
(python) parsing xml file but the elements ends with \