Groups | Blog | Home
all groups > flash data integration > february 2007 >

flash data integration : XML Data


realtime158
2/5/2007 7:04:13 PM
Let?s say you have the following xml document. Now how do I access the name
thumb here is my loop. Also I want to store the value in an array but I don't
want the xml tags to be stored in there as well. How do I get rid of the xml
tags with assigning the data to an array.

Thanks...



<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<listitem name='Kresge'
url='http://www.kirupa.com/developer/mx2004/pg/kresge_sm.jpg'>
<image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg</image>
<link>http://web.mit.edu/evolving/projects/kresge/</link>
</listitem>
</images>

ACTIONSCRIPT BELOW

for ( var i = 0; i < nav.childNodes.length; i++ ) {
var dataINF = nav.childNodes[i];
if ( dataINF.nodeName == "link" )
{

lbllink.text=dataINF;

}

}
MotionMaker
2/6/2007 12:32:08 PM
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success:Boolean):Void {
if (success) {
for (var itemNode:XMLNode = this.firstChild.firstChild; itemNode != null;
itemNode = itemNode.nextSibling) {
trace(itemNode.attributes.name);
}

}
};
myXML.load("Temp3XML.xml");

AddThis Social Bookmark Button