I need to find all elements which contain CDATA. I iterate through the entire tree.
The problem is, ElementTree strips CDATA tag, leaving no trace. Is there a similar solution to nodeType or CDATASection from xml.dom?
Thanks
It might not help you, but if CDATA is important to you, then CDATA is being misused. Writing <a><![CDATA[xxx]]></a> should be 100% equivalent to writing <a>xxx</a> which is why most XML APIs won't distinguish the two in the data they pass to the application.
<a><![CDATA[xxx]]></a>should be 100% equivalent to writing<a>xxx</a>which is why most XML APIs won't distinguish the two in the data they pass to the application.