# Getting X & Y coordinates from XML file

**URL:** https://forum.kirupa.com/t/getting-x-y-coordinates-from-xml-file/179300
**Category:** flash
**Created:** [February 18, 2006, 4:37pm UTC](https://forum.kirupa.com/t/getting-x-y-coordinates-from-xml-file/179300 "2006-02-18T16:37:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![e\_k](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@e\_k](https://forum.kirupa.com/u/e_k)
#### Post date: [February 18, 2006, 4:37pm UTC](https://forum.kirupa.com/t/getting-x-y-coordinates-from-xml-file/179300/1 "2006-02-18T16:37:39Z")

</div>

Hello everyone!

can someone pleaseeeeeeeeeeeeeeeeeee help me!!! :h:

I am creating a small navigation application and would like to know how can i get the values of x & y cordinates that are loaded into an array (from a XML file) to actually create the number of movie clips required and position them according to the x & y values stated in the XML file?

Bascially, if for example, the xml file looks like this:  
\<images\>  
\<icon\>  
\<x\>320\</x\>  
\<y\>250\</y\>  
\<id\>1\</id\>  
\</icon\>

\<icon\>  
\<x\>340\</x\>  
\<y\>280\</y\>  
\<id\>2\</id\>  
\</icon\>  
\</images\>

when this file is loaded, the xml nodes are parsed into an aary that holds all the values and displays them.

But what i want is that for the x & y it should use these values to position the movieclips that hold the icon.

now i think i need a ‘for’ loop for it to count the number of entries to be able to generate that number of emptymovie clips.

and after that something like:

x[0] = the x coordinate  
y[1] = the y coordinate

Any help on this topic (or more on arrays) would be highly appreciated.

Many thanks in advance.

E
