4 Nov
2020
4 Nov
'20
8:40 a.m.
Something like: newText = someTransformation(element.text) element.text = CDATA(newText) if hasCDATA(element) else newText
Ok, I'm now just using as a workaround for hasCDATA: hasCDATA = etree.tostring(element).find(b"<![CDATA[") >= 0 Not very nice and efficient, but for the one time operation in my case sufficient. Greetings, Daniel