# Using a variable when parsing an XML tree

**URL:** <https://forum.kirupa.com/t/using-a-variable-when-parsing-an-xml-tree/257147>\
**Category:** Uncategorized\
**Created:** [April 10, 2008, 5:18pm UTC](https://forum.kirupa.com/t/using-a-variable-when-parsing-an-xml-tree/257147 "2008-04-10T17:18:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greggreg](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@greggreg](https://forum.kirupa.com/u/greggreg)\
**Post date:** [April 10, 2008, 5:18pm UTC](https://forum.kirupa.com/t/using-a-variable-when-parsing-an-xml-tree/257147/1 "2008-04-10T17:18:01Z")

</div>

Hey,

```
 I'm having a bit of trouble using a variable when parsing an XML tree. I'm attempting to do something like the following:

```

```auto

var $album:String = "people";

$myXML.$album.photo[1];

```

```
 Of course it thinks I'm looking for an XML node named "$album" when in fact I'm looking for an XML node named "people". Any help?

```

thanks.
