Use onData instead of onLoad.

my_xml = new XML();
my_xml.onData = function(str)
{
    if(str.substr(0, 1) != "?")
    {
        this.loaded = true;
        this.parseXML(str);
        this.onLoad(true);
    }
};

----- Original Message ----- 
From: "Josh Gormley" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Friday, November 04, 2005 4:38 PM
Subject: [Flashcoders] XML processing instructions


Hello,

Is there a way to get Flash to ignore XML processing instructions  
(PI)?  I have a project which uses XML files for content and one of  
my clients is using Altova Authentic to edit the files.   
Unfortunately, this app adds <? altova_sps somefile.sps ?> to the top  
of the XML file.  This line causes Flash to choke on the XML file.

I did some tests and moved the PI to the middle of the XML doc and  
Flash is able to read the XML file up to the location of the PI and  
then it chokes again.  The only way I see of getting this to work is  
to have the PI at the very end of the XML document, which of course I  
cannot control.

Any thoughts?

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

Reply via email to