# XML loop through childnodes problem

**URL:** <https://forum.kirupa.com/t/xml-loop-through-childnodes-problem/144261>\
**Category:** Uncategorized\
**Created:** [April 12, 2005, 10:14pm UTC](https://forum.kirupa.com/t/xml-loop-through-childnodes-problem/144261 "2005-04-12T22:14:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsiger](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@tsiger](https://forum.kirupa.com/u/tsiger)\
**Post date:** [April 12, 2005, 10:14pm UTC](https://forum.kirupa.com/t/xml-loop-through-childnodes-problem/144261/1 "2005-04-12T22:14:46Z")

</div>

Hello guys,

as this is my first post i’d like to say this site and its members that you r doing a really good job 🙂

So here’s my problem.

I have the following XML file.

```auto

[color=#0000ff]<?xml version="1.0" encoding="ISO-8859-7" ?>[/color] 
[color=#0000ff]<[/color][color=#990000]rss version[/color][color=#0000ff]="[/color] **0.91** [color=#0000ff]">[/color]
[color=#0000ff]<[/color][color=#990000]channel[/color][color=#0000ff]> [/color]
[color=#0000ff] <[/color][color=#990000]title[/color][color=#0000ff]>[/color] **my title** [color=#0000ff]</[/color][color=#990000]title[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]link[/color][color=#0000ff]>[/color]**[http://www.domain.com](http://www.domain.com/)**[color=#0000ff]</[/color][color=#990000]link[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]description[/color][color=#0000ff]>site desc[/color][color=#0000ff]</[/color][color=#990000]description[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]language[/color][color=#0000ff]>en[/color][color=#0000ff]</[/color][color=#990000]language[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]item[/color][color=#0000ff]>[/color]
[color=#0000ff] <[/color][color=#990000]title[/color][color=#0000ff]>item title1[/color][color=#0000ff]</[/color][color=#990000]title[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]link[/color][color=#0000ff]>link 1 text[/color][color=#0000ff]</[/color][color=#990000]link[/color][color=#0000ff]>[/color] 
[color=#0000ff] </[/color][color=#990000]item[/color][color=#0000ff]>[/color]
[color=#0000ff] <[/color][color=#990000]item[/color][color=#0000ff]>[/color]
[color=#0000ff] [/color] [color=#0000ff]<[/color][color=#990000]title[/color][color=#0000ff]>item title2[/color][color=#0000ff]</[/color][color=#990000]title[/color][color=#0000ff]>[/color] 
[color=#0000ff] <[/color][color=#990000]link[/color][color=#0000ff]>link 2 text[/color][color=#0000ff]</[/color][color=#990000]link[/color][color=#0000ff]>[/color] 
[color=#0000ff] </[/color][color=#990000]item[/color][color=#0000ff]>[/color]
[color=#0000ff]</[/color][color=#990000]channel[/color][color=#0000ff]>[/color]
[color=#0000ff]</[/color][color=#990000]rss[/color][color=#0000ff]>[/color]

```

i am trying to get the length of the childnodes in order to loop through the items and manipulate them in some way with Flash MX Pro 2004.

i am using the following:

```auto
 xmlLength = myXML.firstChild.childNodes.length

```

but the result is “1”.

I know that it make sense but how is it possible with the current structure to get the length of items?

Hope it makes sense 🙂
