Am I missing something simple? The research I've done all say that reading
cdata from an xml in flash is easy, so they don't explain how. Here's my
problem. Node looks like this:
<DDATE>
<#cdata-section>2007-06-19 14:38:58.0</#cdata-section>
</DDATE>
but when I try to convert it to a string (mystring=xml.node.DDATE) I get the
above (which I'm going to go ahead and parse today for what I need). If I try
to parse xml.node.DDATE.child, .firstChild, or .text all I get is empty string
"". I can't try xml.node.DDATE.#cdata-section because that creates a compiler
error
Any thoughts?
Thanks.
Raymond Basque - 20 Jun 2007 13:31 GMT
First, where does this "<#cdata-section>" syntax come from?
The proper way to markup a CDATA section is <![CDATA[]]>. See
http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect
Using your example:
var xml:XML = new XML("<DDATE><![CDATA[2007-06-19 14:38:58.0]]></DDATE>");
trace(xml.firstChild.firstChild.nodeValue)