E4X can be used for external xml files too.
Your problem might be a namespace issue I blogged abt a couple of days back
?
http://arulprasad.blogspot.com/2007/05/using-as30-with-e4x-for-jabber-iq.html
Don't bother about the jabber part in the post, just look for the namespace
related details.
~Arul Prasad.
On 5/30/07, daniel <[EMAIL PROTECTED]> wrote:
Hey everyone!
I'm using an URLLoader to load a XML configuration file. I try to read the
XML file using some E4X syntax ([EMAIL PROTECTED]), but I get
nothing but an empty string when I trace it out.
However when I do the same to a local variable with some hard-coded XML as
its value, the E4X expressions work as expected. Can I use E4X and the XML
data type for external XML content? I double-checked if the URLLoader is
loading the content successfully by simply tracing it out. That works. Any
ideas?
Excuse me if this has been asked before.
Quick idea of what I'm doing...
function urlLoaderCompleteHandler(eventObj:Event):void {
// ...
var xmlData:XML = new XML(eventObj.target.data);
}
// ...
trace(xmlData.myElement); // Zip!
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
Arul Prasad
http://arulprasad.blogspot.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com