0

I have a function written (and tested) that converts non-ascii characters in a file to their ordinal values in the form of an html numeric codepoint (hope I said that correctly), but etree converts the coepoints back to entities when I parse the file. Here's a snippet of my code:

import xml.etree.ElementTree as ET

parse_file = cleanfile.cleanfile(file)
root = ET.fromstring(parse_file)

e.g. & #233; becomes é in my output file.

Any help would be greatly appreciated!

seitzej
  • 131
  • 1
  • 7

0 Answers0