# Get XML Node Without Name

**URL:** <https://forum.kirupa.com/t/get-xml-node-without-name/298770>\
**Category:** flash\
**Created:** [October 24, 2009, 5:35pm UTC](https://forum.kirupa.com/t/get-xml-node-without-name/298770 "2009-10-24T17:35:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stubbs](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Stubbs](https://forum.kirupa.com/u/Stubbs)\
**Post date:** [October 24, 2009, 5:35pm UTC](https://forum.kirupa.com/t/get-xml-node-without-name/298770/1 "2009-10-24T17:35:00Z")

</div>

Does anyone know of a way to get an XML node’s name? Or to call the node without knowing it’s name? I’m looking for something generic and reusable, with the child-node name not hard coded. My XML looks like this:

```auto
<list>
  <doc>145</doc>
  <doc>388</doc>
  ...
  <doc>375</doc>
</list>

```

And my .as class looks like this:

```auto
listLoader = new URLLoader(new URLRequest(address));
xmlData = XML(listLoader.data);

for(var i:int = 0; i < xmlData.doc.length(); i++)
{
    xmlNum = Number(xmlData.doc*);
    fileNumArray.push(xmlNum);
}

```

I’ve tried to import a string into the class to replace “doc”, using XMLList, descendants, elements, children, etc. and nothing seems to work short of turning the whole thing into a string and chopping it up later. Any advice? Thanks
