# XML issue

**URL:** <https://forum.kirupa.com/t/xml-issue/290823>\
**Category:** Uncategorized\
**Created:** [June 20, 2009, 1:43am UTC](https://forum.kirupa.com/t/xml-issue/290823 "2009-06-20T01:43:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidtidwell86](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@davidtidwell86](https://forum.kirupa.com/u/davidtidwell86)\
**Post date:** [June 20, 2009, 1:43am UTC](https://forum.kirupa.com/t/xml-issue/290823/1 "2009-06-20T01:43:58Z")

</div>

Hello,

I have the two following lines of code:

```auto

xml = new XML(e.target.data);
var il:XMLList = xml.image.description;

```

This two lines work perfect, but only if you know what the name of the ‘description’ node is. I would like to be able to take do something similar to this: (I know it won’t work, but I’m trying to illustrate a point here :ch:)

```auto

var nodeName:String = new String("description");

xml = new XML(e.target.data);
var il:XMLList = xml.image.nodeName;

```

The reason I’d be able to do this, is because it’s in a class, and when this class is referenced, the user can specify the name of the node in his/her XML file. Thanks so much in advance!
