# XML List Help

**URL:** <https://forum.kirupa.com/t/xml-list-help/237789>\
**Category:** flash\
**Created:** [September 4, 2007, 12:34am UTC](https://forum.kirupa.com/t/xml-list-help/237789 "2007-09-04T00:34:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponyack](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@ponyack](https://forum.kirupa.com/u/ponyack)\
**Post date:** [September 4, 2007, 12:34am UTC](https://forum.kirupa.com/t/xml-list-help/237789/1 "2007-09-04T00:34:50Z")

</div>

So I am trying to create lists with links.

The issue I have is that I can only display three items from the XML file.

In my search I see that I am missing lines pertaining to the childnodes

How do I add that to my AS? Any help would be great

Thanks

This is the XML

```auto
headlineXML = new XML();

headlineXML.onLoad = myLoad;
headlineXML.load("emails.xml");
headlineXML.ignoreWhite = true;

function myLoad(ok) {
    if (ok == true) {
        Publish(this.firstChild);
    }
}

function Publish(HeadlineXMLNode) {
    if (HeadlineXMLNode.nodeName.toUpperCase() == "BROADCAST") {
        content = "";
        story = HeadlineXMLNode.firstChild;
        while (story != null) {
            if (story.nodeName.toUpperCase() == "STORY") {
                lead = "";
                body = "";
                URL = "";
                element = story.firstChild;
                while (element != null) {
                    if (element.nodeName.toUpperCase() == "LEAD") {
                        lead = element.firstChild.nodeValue;
                    }
                    if (element.nodeName.toUpperCase() == "BODY") {
                        body = element.firstChild.nodeValue;
                    }
                    if (element.nodeName.toUpperCase() == "URL") {
                        URL = element.firstChild.nodeValue;
                    }
                    element = element.nextSibling;
                }
                content += "<font size='+1' color='#3366cc'><a href='"+URL+"'>"+lead+"</a></font><br>"+body+"<br>";
                txt_holder.txt.htmltext=content;
            }
            story = story.nextSibling;
        }
    }
}

```

This is the XML

```auto
<broadcast>
<story>
<lead>first</lead>
<URL>mailto:amy@email.com</URL>
</story>

<story>
<lead>second.</lead>
<URL>http://www.url.com/</URL>
</story>

<story>
<lead>third</lead>
<URL>mailto:amy@email.com</URL>
</story>

</broadcast>

```
