Hello,
I'm trying to write a python script that takes in one or two xml files and outputs one or two new files based on the contents of the input files. I was trying to write this script using the minidom module. However, the input files contain a number of instances of the escape character
inside node attributes. Unfortunately, in the output files, these characters have been converted to different characters, which seem to be newline characters.
For example, a line in the input file such as:
<Entry text="For English For Hearing Impaired
Press 3 on Keypad"
Would be output as
<Entry text="For English For Hearing Impaired
Press 3 on Keypad"
I read that minidom is causing this, as it doesn't allow escape characters in xml attributes (I think). Is this true? And, if so, what's the best tool/method to use to parse an xml file into a python document, manipulate nodes and exchange them with other documents, and output documents back to new files?
If it helps, I was also parsing and saving these files using 'utf-8' encoding. I don't know if this is part of the problem or not. Thanks for any help anyone can give.
-Alex Kaiser