On Tue, Jan 5, 2016 at 9:37 AM, Harbs <harbs.li...@gmail.com> wrote:
> 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 > > That's good news. However, I don't think toXMLString() would be a problem since you have to support escaped text anyway. Yes, it would be different from having the CDATA tag, but you would not lose any information other than the fact that there was a CDATA tag originally used to encode the text. The removal of CDATA was specific to HTML, not XML in general, and you can't put XML literals in JavaScript code anyway. Are you using a built-in JavaScript feature to parse the XML string and it doesn't support CDATA?