# Access xml nodes in flash

**URL:** <https://forum.kirupa.com/t/access-xml-nodes-in-flash/220636>\
**Category:** Uncategorized\
**Created:** [March 27, 2007, 8:59pm UTC](https://forum.kirupa.com/t/access-xml-nodes-in-flash/220636 "2007-03-27T20:59:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kredd](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kredd](https://forum.kirupa.com/u/kredd)\
**Post date:** [March 27, 2007, 8:59pm UTC](https://forum.kirupa.com/t/access-xml-nodes-in-flash/220636/1 "2007-03-27T20:59:22Z")

</div>

ok, im about to pull ALL my hair out trying figure the tree model for accessing xml nodes in flash. just when i think i have it figured out…i don’t.

my XML file…

```auto
 
<?xml version="1.0" encoding="iso-8859-1"?>
 <mag>
  <item>
   <name>.../images/randoms/1.jpg</name>
   <width>400</width>
  </item>
  <item>
   <name>.../images/randoms/2.jpg</name>
   <width>250</width>
  </item>
  <item>
   <name>.../images/randoms/4.jpg</name>
   <width>400</width>
  </item>
 </mag>

```

my flash as…

```auto
 
//loads my photos CORRECTLY (using for loop)
p.loadMovie(nodes*.firstChild.childNodes[0].nodeValue);

```

so why doesn’t the code below load the widths??

```auto
 
p.loadMovie(nodes*.firstChild.childNodes[1].nodeValue);

```

when i trace this…

```auto
 
trace(nodes*.childNodes[1]);

```

i get “\<width\>400\</width\>,\<width\>250\</width\>, etc” so i add “.nodeValue” to the end of the trace and then it returns NULL.

my head hurts! can anyone point me in the right direction or to a good tutorial? thanks!
