Subject:Failure of CDATA converting properly Author:Michael Nevins Date:01 Jun 2010 12:36 PM
I am having a problem with maintaining the CDATA in my output with every line of code that is blank. I maintain the element name and attribute, but lose the CDATA.
<Line Number="60"><![CDATA[]]></Line>
I get back the following:
<Line Number="60"/>
Please advise
Michael A. Nevins
Northrop Grumman
Electronic Systems
Subject:Failure of CDATA converting properly Author:Minollo I. Date:01 Jun 2010 12:46 PM
Nothing we can do there; an empty CDATA section implies you really have no text node there. And when you serialize the element back, no children text nodes are created either; which implies you don't get the CDATA section back.
Just to be clear, as already hinted in a different post, there is no difference in the XML infoset among:
<element/>
<element></element>
<element><![CDATA[]]></element>