oh..you got it solved..nice.
I was going to post an alternative solution to working with XML..
but you got it all fixed.
here it is anyways..
AS 2.0:
actionscript Code:
importXML = new XML();
importXML.ignoreWhite = true;
importXML.onLoad = function(success) {
if (!success) {
trace("XML failed to load");
} else {
trace("XML LOADED");
//firstNode
var firstNode = this.childNodes[0];
//attributes
var xProj = firstNode.attributes.project;
var xDate = firstNode.attributes.date;
//secondNode [objects]
var secondNode = this.childNodes[1];
var totalObjects = secondNode.childNodes.length;
//trace(newline+"TOTAL OBJECTS: "+totalObjects);
for (i=0; i<totalObjects; i++) {
var negrita = secondNode.childNodes[i].attributes.negrita;
var header = secondNode.childNodes[i].attributes.header;
trace(newline+"Object Header "+(i+1)+": "+header);
var totalLinks = secondNode.childNodes[i].childNodes.length;
trace("TOTAL LINKS: "+totalLinks);
for (s=0; s<totalLinks; s++) {
var link = secondNode.childNodes[i].childNodes[s].firstChild;
trace("LINK: "+link);
}
}
}
};
importXML.load("data.xml");
the XML:
PHP Code:
<?xml version="1.0"?>
<select project="xmldata" date="11/20/2004" />
<objects>
<object negrita="Something Here 1-1" header="Something else here 1-1">
<link>document1-1.pdf</link>
<link>document1-2.pdf</link>
<link>document1-3.pdf</link>
</object>
<object negrita="Something Here 2-2" header="Something else here 2-2">
<link>document2-1.pdf</link>
<link>document2-3.pdf</link>
</object>
</objects>