# Simple XML... can't get to work

**URL:** <https://forum.kirupa.com/t/simple-xml-cant-get-to-work/169654>\
**Category:** Uncategorized\
**Created:** [November 18, 2005, 2:19am UTC](https://forum.kirupa.com/t/simple-xml-cant-get-to-work/169654 "2005-11-18T02:19:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![woodman650](https://avatars.discourse-cdn.com/v4/letter/w/b9bd4f/32.png) [@woodman650](https://forum.kirupa.com/u/woodman650)\
**Post date:** [November 18, 2005, 2:19am UTC](https://forum.kirupa.com/t/simple-xml-cant-get-to-work/169654/1 "2005-11-18T02:19:24Z")

</div>

hey all, I can’t get my flash movie to display the XML data…

```auto
 
function GenerateProducts (products_xml){
var productpix = products_xml.firstChild.childNodes; 
for (var i=0; productpix.length; i++) {	 
var currentproduct = productpix*;	 
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i, i);
currentThumb_mc._x = i * thumb_spacing; 
}
}
//create XML data in doc and specify location
var products_xml = new XML(); 
products_xml.ignoreWhite = false; 
products_xml.onLoad = function (success){ 
called "Success"
if (success){ GenerateProducts(this); 
//trace(this); 
} //if onLoad works, execute function "GenerateProducts"
else trace ("error loading XML file, sucka!");} 
products_xml.load("products.xml");
///////////////////////////////////// 
//var currentProduct = productpix*;
desc_txt.text = currentProduct.attributes.stitle;
trace (productpix);

```

```auto
 XML: 
<images>
<section stitle="Deer Resistance YO">
<pic>
	<category>Deer Resistant Gardens</category>
	<image>images/1_1.jpg</image>
	<caption>Information goes here</caption>
	<thumbnail>images/thumbs/1_1.jpg</thumbnail>
</pic>
</section>
</images>

```

I can’t get the trace to work on “productpix”… I get “undefined”
