Hi,
I am creating CDATA section as a child node. I have seen below mentioned behavior with Firefox, IE8,9, and 10
Using below code
if (window.DOMParser)
xmlDoc = domParser.parseFromString(xmltext, "text/xml");
else
xmlDoc.loadXML(strXML);
var elem= xmlDoc.createElement("a");
elem.appendChild(xmlDoc.createCDATASection("some value"))
With IE,8,9, and firefox if i pass empty string , it still creates CDATA section with nothing in bracket like below
<a sd="7493" re="453" yh="67"><![CDATA[]] > </a>
But with IE 10 , it does not create CDATA if no value is passed in createCDATASection. Also with IE10, it passes window.DomParser check. Also if make IE10 also load xml like xmlDoc.loadXML(strXML); then it does create CDATA for IE10 as well.
Can anyone explain why such kind a behavior