# Trouble loading XML file.Please help me!

**URL:** https://forum.kirupa.com/t/trouble-loading-xml-file-please-help-me/252245
**Category:** flash
**Created:** [February 18, 2008, 12:22pm UTC](https://forum.kirupa.com/t/trouble-loading-xml-file-please-help-me/252245 "2008-02-18T12:22:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ecptavares](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ecptavares](https://forum.kirupa.com/u/ecptavares)
#### Post date: [February 18, 2008, 12:22pm UTC](https://forum.kirupa.com/t/trouble-loading-xml-file-please-help-me/252245/1 "2008-02-18T12:22:12Z")

</div>

Hi!

I have a xml file with this structure :

```auto

<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
   <photo thumb="images\foto1.jpg" url="images\foto1.jpg" caption="DJ Chambinho fazendo o Gas Total."/>
   <photo thumb="images\foto1.jpg" url="images\foto2.jpg" caption="DJ Chambinho mixando no Gas Total."/>
   <photo thumb="images\foto1.jpg" url="images\foto3.jpg" caption="DJ Pele,Emersom(Barriga),Danielle e DJ Chambinho na Vintage."/>
   <photo thumb="images\foto1.jpg" url="images\foto4.jpg" caption="DJ Chambinho e sua linda mulher, DJ Gabriela, na Joy."/>
   <photo thumb="images\foto1.jpg" url="images\foto5.jpg" caption="Entrada do Olympia Disco Show."/>
   <photo thumb="images\foto1.jpg" url="images\foto6.jpg" caption="Pista de danca do Olympia Disco Show."/>
</slideshow>

```

and I am trying to load each image into an empty MC but it is not working. I am sure there is something wrong with my code.Could You guys help me out?

```auto
import flash.events.*;

stop();

var xLoader : URLLoader = new URLLoader();
var xml : XML;

xLoader.addEventListener(Event.COMPLETE,onComplete);
xLoader.load(new URLRequest("album.xml"));
                              
function onComplete(e:Event):void
{
   xml = new XML(e.target.data);
   var lista :XMLList = xml.slideshow.photo;
   holder.addChild(lista[0]);   
}

```

What is wrong and what else I need to do?
