This what I got so far
[COLOR=Red]<eqid>
<id1>
<id>41</id>
<desc>TEST</desc>
<serial>123456</serial>
</id1>
</eqid>[/COLOR]
and the AS that I was trying to do is:
[COLOR=Blue]function loadXML(loaded) {
if (loaded) {
_root.eqid= this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.desc= this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.serial= this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
id.text = _root.eqid;
desc.text = _root.desc;
serial.text = _root.serial;
} else {
trace(“file not loaded!”);;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“structure.xml”);
[/COLOR]
the problem I think I have is the firstChild directions…please help, I did the tut on your site http://www.kirupa.com/developer/actionscript/xmldataflash.htm
and still dont understand the direction from tree to branch…you got in your AS inventor as root and comment as root, that doent make much sense to me. Isnt comment a node instead of a root ?
thanks in advance!