I think I have some other things that are tripping it up. Looking in the debugger my event.target.data is coming in partially unescaped
<?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/ "><photos><item><![CDATA[http://.... On Sun, Mar 16, 2008 at 2:53 AM, Muzak <[EMAIL PROTECTED]> wrote: > Odd, I used your xml for testing and it shows: http://tempuri.org/ > > //XML > <?xml version="1.0" encoding="UTF-8"?> > <string xmlns="http://tempuri.org/"> > <photos> > <item><![CDATA[ > http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]<http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D> > ></item> > <item><![CDATA[ > http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]<http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg%5D%5D> > ></item> > </photos> > </string> > > > //TESTED in FLA > var req:URLRequest = new URLRequest("photos.xml"); > var loader:URLLoader = new URLLoader(); > loader.addEventListener(Event.COMPLETE, loaderCompleteHandler); > loader.load(req); > > function loaderCompleteHandler(evt:Event):void { > trace("Application ::: loaderCompleteHandler"); > var data:XML = new XML(evt.currentTarget.data); > //trace(data.toXMLString()); > trace(data.namespace("")); > default xml namespace = data.namespace(""); > trace(data.photos.item[0]); > } > > //OUTPUT > Application ::: loaderCompleteHandler > http://tempuri.org/ > http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg > > regards, > Muzak > > ----- Original Message ----- > From: "Jason Van Cleave" <[EMAIL PROTECTED]> > To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com> > Sent: Sunday, March 16, 2008 12:11 AM > Subject: Re: [Flashcoders] AS3 XML Namespaces Hell > > > > Thanks Muzak for looking. However that isn't working for me. I don't get > > anything after trace(data.namespace("")); > > > > On Sat, Mar 15, 2008 at 5:38 AM, Muzak <[EMAIL PROTECTED]> wrote: > > > >> Set the namespace of the loaded xml as default: > >> > >> function loaderCompleteHandler(evt:Event):void { > >> var data:XML = new XML(evt.currentTarget.data); > >> trace(data.toXMLString()); > >> trace(data.namespace("")); > >> default xml namespace = data.namespace(""); > >> trace(data.photos.item); > >> } > >> > >> > >> ----- Original Message ----- > >> From: "Jason Van Cleave" <[EMAIL PROTECTED]> > >> To: "Flash Coders List" <Flashcoders@chattyfig.figleaf.com> > >> Sent: Saturday, March 15, 2008 5:24 AM > >> Subject: [Flashcoders] AS3 XML Namespaces Hell > >> > >> > >> >I have an app that is was pulling some XML like this > >> > > >> > <?xml version="1.0" encoding="UTF-8"?> > >> > <photos> > >> > <item><![CDATA[ > >> > http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]<http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D> > <http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D> > >> ></item> > >> > <item><![CDATA[ > >> > http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]<http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D> > <http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D> > >> ></item> > >> > <item><![CDATA[ > >> > http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]<http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D> > <http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D> > >> ></item> > >> > <item><![CDATA[ > >> > http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]<http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D> > <http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D> > >> ></item> > >> > </photos> > >> > > >> > with this i could load xml and eventually get an XMLList with > >> > > >> > private function onXMLLoaded(e:Event):void > >> > { > >> > var xml:XML = new XML(e.target.data); > >> > var items:XMLList = xml.item; > >> > } > >> > > >> > >> _______________________________________________ > >> Flashcoders mailing list > >> Flashcoders@chattyfig.figleaf.com > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > > _______________________________________________ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders