# XML in Listbox?

**URL:** <https://forum.kirupa.com/t/xml-in-listbox/157362>\
**Category:** flash\
**Created:** [August 1, 2005, 1:50pm UTC](https://forum.kirupa.com/t/xml-in-listbox/157362 "2005-08-01T13:50:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VersusMG](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@VersusMG](https://forum.kirupa.com/u/VersusMG)\
**Post date:** [August 1, 2005, 1:50pm UTC](https://forum.kirupa.com/t/xml-in-listbox/157362/1 "2005-08-01T13:50:46Z")

</div>

okay i have an xml file set up like this.

```auto

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Artists>
	<Artist>
		<aname group="Jack Johnson" g_url="swf/content.swf" />
		<image>images/1.jpg</image>
		<desc>This is a description of the musician you have clicked on. What you are about to do is notice how great this person is.</desc>
		<alink>http://www.versusmediagroup.com</alink>
	</Artist>
	<Artist>
		<aname group="Brand New" g_url="swf/content.swf" />
		<image>images/2.jpg</image>
		<desc>This is the SECOND PERSON</desc>
</Artists>

```

and my action script set up like this

```auto

var vlist:XML = new XML();
vlist.ignoreWhite = true;
vlist.onLoad = function() {
	var videos:Array = this.firstChild.childNodes;
	for (i=0; i<videos.length; i++) {
		list.addItem(videos*.attributes.group, videos*.attributes.g_url);
	}
};
vlist.load("artists.xml");

```

‘list’ is the instance name i gave the ListBox Component. But when i test it the list box says Undefined, Undefined?

If anyone knows how to fix this please let me know!

Thanks
