At 09:03 PM 11/8/2005, you wrote:
Hi all,

Using Flash 8 Pro.

I am a little confused on whether or not Flash can import data in a
CDATA through XML. I am just getting started with XML in Flash, so
not sure if it's something I am doing or not, but I can get all my
data in my XML except what is in a CDATA. When loading the schema in
the Component Editor for an XMLConnector, the elements with CDATA
data have type <empty>. The other elements have their proper types.

I've Googled my butt off today and found some people say that CDATA
is supported, some say it is not supported, some say it is only
supported on the way in and not the way out. What I'm trying to do is
load data into an XMLConnector, then bind to a user interface
component such as a DataGrid, eventually with a DataSet component in
between.

Can CData be used through an XMLConnector? Do I have to do things
manually via a new XML(), etc., or will even that not work?

Thanks,
Ron Wagner
[EMAIL PROTECTED]


Ron,

I'm using this in MX 2004 to fetch the news for a given day from a MySQL database. feed_xml_story.php uses place CDATA tabs in the ouput stream so that the getNodes() function doesn't keep thinking that <b> or <br> are new XML tags.

function getStories(dtChosen)
{
        var xmlReceiver:XML = new XML();
        xmlReceiver.ignoreWhite = true;
        var varSender:LoadVars = new LoadVars();
        varSender.cacheKiller = new Date().getTime();
        if( dtChosen == "" )
        {
                xmlReceiver.load( "http://"; + host + "feed_xml_story.php");
        }
        else
        {

xmlReceiver.load( "http://"; + host + "feed_xml_story.php?dtDate="+ dtChosen);
        }

        //varReceiver.onLoad = function( )
        xmlReceiver.onLoad = function( success:Boolean )
        {

                if (success)
                {
// parse the content, getNodes comes from Steve Nelson's The Golden Mean.
                        arrHeads = getNodes( this, "head");
                        arrStorys = getNodes( this, "story");
                        displayContent(arrHeads);


                } else
                {
                // Otherwise tell the user the vars couldn't be loaded.
                txtNews.text = "Load failed.";
                } // end if (succes ..
}


I do not have Pro, but found Steve Nelson's discussion of an RSS Reader at his The Golden Mean site v. clear. Here's the URL:
http://www.thegoldenmean.com/technique/rssReader01.html

Well worth a look - Miles Thompson


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to