Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / June 2007



Tip: Looking for answers? Try searching our database.

Parsing CDATA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keltaz - 19 Jun 2007 21:20 GMT
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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.