# Multiple XML attributes problem

**URL:** https://forum.kirupa.com/t/multiple-xml-attributes-problem/230748
**Category:** flash
**Created:** [June 28, 2007, 6:05pm UTC](https://forum.kirupa.com/t/multiple-xml-attributes-problem/230748 "2007-06-28T18:05:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Vincenz0](https://avatars.discourse-cdn.com/v4/letter/v/e9c0ed/32.png) [@Vincenz0](https://forum.kirupa.com/u/Vincenz0)
#### Post date: [June 28, 2007, 6:05pm UTC](https://forum.kirupa.com/t/multiple-xml-attributes-problem/230748/1 "2007-06-28T18:05:36Z")

</div>

I writing a simple news content mgmt script for flash. It follows this path HTML(forms)–\>PHP–\>MySQL–\>PHP–\>XML–\>Flash. I have everything but the flash actionScript working.

For some reason I can not get these attributes to load into a dynamic text field.

here’s the XML code:

```auto
<xml version="1.0"?>
<news>
<stories id="1" date="June 21, 2007" story="testing the story, blah blah blah" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
<stories id="2" date="June 22, 2007" story="Story number 2, more blah blah blah" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
<stories id="3" date="June 23, 2007" story="Story number 3, f marry kill" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
<stories id="4" date="June 24, 2007" story="Its my birthday!" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
<stories id="5" date="June 27, 2007" story="ASDKASKDHAKSHDAKSDHAKSDAKJSHDAKJSD" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
<stories id="6" date="June 28, 2007" story="It WORKS!!!! cheap jew son of a *****!" spacer="+++++++++++++++++++++++++++++++++++++++++++++++++" />
</news>

```

here is my action script code:

```auto

// Attributes arrays
var nd:Array = new Array();
var ns:Array = new Array();
var sp:Array = new Array();

// Load XML
var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
newsXML.onLoad = function() 
    {
    var nodes:Array = this.firstChild.childNodes; 
    for(i=0;i<nodes.length;i++) 
        {
            nd.push(nodes*.attributes.date);
            ns.push(nodes*.attributes.story);
            sp.push(nodes*.attributes.spacer);
        }
        theNews.text = nd+ns+sp;
    }

newsXML.load("news.php");

```

It keeps returning a “NaN” value in my dynamic text box(instance name: theNews). and when i change theNews.text to only load on var(nd) it returns undefined.

any suggestions?

thanks
