# Can I access XML nodeName?

**URL:** <https://forum.kirupa.com/t/can-i-access-xml-nodename/282512>\
**Category:** flash\
**Created:** [February 23, 2009, 3:30am UTC](https://forum.kirupa.com/t/can-i-access-xml-nodename/282512 "2009-02-23T03:30:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [February 23, 2009, 3:30am UTC](https://forum.kirupa.com/t/can-i-access-xml-nodename/282512/1 "2009-02-23T03:30:11Z")

</div>

Hi there,

I load all my content via XML these days into my flash site, but I was wondering if there is a way to access the nodeName of the XML I am bringing in? Now I don’t know if this is a very stupid way to do things, but I usually parse all the data into an array as I bring it thru the onLoad command.

So instead doing this:

[AS]book\* = this.firstChild.childNode[3].firstChild.nodeValue;[/AS]

… can I do something like :

[AS]book\* = this.firstChild.nodeName[‘booktitle’].firstChild.nodeValue;[/AS]

Can anyone suggest a better way?
