[COLOR=navy]Hey all![/COLOR]
[COLOR=navy][/COLOR]
[COLOR=navy]Basically, I am having trouble pulling in more than one line of XML data. Here is the line of code I am trying to manipulate to give me more than one line. I have tried duplicating it and changing the values… but it just updates which line it is displaying instead of the first and second one…[/COLOR]
[COLOR=darkorange]_root.setlist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;[/COLOR]
[COLOR=navy]Inside of my XML document it is layed out like this…[/COLOR]
[COLOR=darkorange]<shows>[/COLOR]
[COLOR=darkorange]<show>[/COLOR]
[COLOR=darkorange]<setlist>[/COLOR]
[COLOR=darkorange]<song>Song 1</song>[/COLOR]
[COLOR=darkorange]</song>Song 2</song>[/COLOR]
[COLOR=darkorange]</setlist>[/COLOR]
[COLOR=darkorange]</show>[/COLOR]
[COLOR=darkorange]</shows>[/COLOR]
[COLOR=navy]Here is whole block of code that makes it work…[/COLOR]
[COLOR=darkorange]on (press) {
function loadXML(loaded) {
if (loaded) {
_root.setlist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.showinfo = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
setlist_txt.text = _root.setlist;
showinfo_txt.text = _root.showinfo;
} else {
trace(“XML FILE NOT LOADED!!”);
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“xmlDocument.xml”);
}[/COLOR]
[COLOR=#ff8c00][/COLOR]
[COLOR=navy]Hopefully that is enough information and I hope it is also clear. If someone could help me out, I would greatly appreciate it!![/COLOR]
[COLOR=#000080][/COLOR]
[COLOR=#000080].: f l i p p y[/COLOR]