That’s not going to work if you need to implement toXMLString(). Imagine an mxml file where all the CDATA becomes escaped text. It’s not going to work very well… ;-) The same goes for lots of other XML file uses.
Apparently this recommendation for DOM4 is not gonna happen, so we’re good.[1] [1]https://github.com/whatwg/dom/issues/142 On Jan 5, 2016, at 4:20 PM, Andy Dufilie <andy.dufi...@gmail.com> wrote: > On Tue, Jan 5, 2016 at 7:10 AM, Harbs <harbs.li...@gmail.com> wrote: > >> I cannot find a recommended way to handle CDATA in the DOM4 spec.[3] >> >> Does anyone have a recommendation o how to handle this? >> > > In place of a CDATA text section you can just escape the text using xml > escaping.