How To Convert < Into < In Lxml, Python?
There's a xml file: I go to to to school. For some reason, I changed to &a
Solution 1:
First find a unescape
function:
from xml.sax.saxutilsimportunescape
entry=body[0]
unescape and replace it with the original:
body.replace(entry, e.fromstring(unescape(e.tounicode(entry))))
Post a Comment for "How To Convert < Into < In Lxml, Python?"