This is the meat of my XML file
<panoramic startfirst="true">
<image>pic_1.jpg</image>
<title><![CDATA[ Pan 1 ]]></title>
<content><![CDATA[ pan 1 content ]]></content>
<copyright><![CDATA[copyright]]></copyright>
</panoramic>
these nodes will be populated from a database. so there could be one, there could be a hundred.
What i am unsure of is what is the best way to extract this from the XML and put it into a usable flash variables form so that i can get the data for any particular node using only an id?
i have my for loop set up, and i know how to access the data … i just dont know what to put it in! A multidimensional array? A class (i have no idea about that)? An object?
heres the loop i have set up it shows how i access the XML…
for (i=0; i<this.firstChild.firstChild.childNodes.length; i++) {
//
image_var = this.firstChild.firstChild.childNodes*.childNodes[0].firstChild.nodeValue;
page_title = this.firstChild.firstChild.childNodes*.childNodes[1].firstChild.nodeValue;
page_content = this.firstChild.firstChild.childNodes*.childNodes[2].firstChild.nodeValue;
page_copyright = this.firstChild.firstChild.childNodes*.childNodes[3].firstChild.nodeValue;
//
}
so as u can see that accessess the values from all the nodes, but just keeps setting the same 4 vars to the current nodes value …
anyone who could help me i hope understands :pa: