Hi, I am currently doing an A level computing project, in which I need to parse XML and put the elements into an array. I am using JavaScript in Dreamweaver and the final application will be run in AIR. I am having a hard time understanding the code in this answer to another question: http://stackoverflow.com/questions/649614/xml-parsing-in-javascript/649928#649928
How would I adapt that code to put an XML file chosen by the user into an array, and would it work in AIR?
This is the structure of the XML I want to use:
<node id="0">
<nodetype>0</nodetype>
<connectedto>2,3</connectedto>
<distanceto>10,5</distanceto>
</node>
The structure of the array is:
Node | Type | ConnectedTo | DistanceTo
1 | 0 | 2 | 10
1 | 0 | 3 | 5
Thanks in advance for any help.