nomaeswonk
02-16-2008, 07:03 AM
Here's what works:
xml = new XML(e.target.data);
trace(xml); // outputs: <images>
// <image>01.jpg</image>
// <image>02.jpg</image>
// </images>
Here's where it doesn't:
xml = new XML(e.target.data);
trace(xml); // outputs same as above
var il:XMLList = xml.images;
trace(il); // doesn't output anything
I thought it might be an error with my xml file, but it seems to load fine and it also tried this and it worked fine:
xml = new XML(e.target.data);
trace(xml); // outputs same as above
var il:XMLList = xml.children();
trace(il); // outputs: <image>01.jpg</image>
// <image>02.jpg</image>
Does anyone know what I am doing wrong in that second snippet of code? Could it still be a problem with the xml file?
xml = new XML(e.target.data);
trace(xml); // outputs: <images>
// <image>01.jpg</image>
// <image>02.jpg</image>
// </images>
Here's where it doesn't:
xml = new XML(e.target.data);
trace(xml); // outputs same as above
var il:XMLList = xml.images;
trace(il); // doesn't output anything
I thought it might be an error with my xml file, but it seems to load fine and it also tried this and it worked fine:
xml = new XML(e.target.data);
trace(xml); // outputs same as above
var il:XMLList = xml.children();
trace(il); // outputs: <image>01.jpg</image>
// <image>02.jpg</image>
Does anyone know what I am doing wrong in that second snippet of code? Could it still be a problem with the xml file?