Hi Karl,
You're not parsing the context_string as XML or HTML; so lxml will be thinking
its just some text that looks horribly like XML but is not XML and therefore
needs to be escaped to be included within XML.
The following:
import lxml.etree as etree
content_text = 'line oneline two'
en_no
Hello, I need to add some HTML inside XML. The result should look like this:
the code i'm using is this:
# read html from file - result is :
content_text = 'line oneline two'
en_note_el = etree.Element('en-note')
en_note_el.text = content_text
en_note_doctype = 'h