# How to read more than one attribute in a XML file?

**URL:** <https://forum.kirupa.com/t/how-to-read-more-than-one-attribute-in-a-xml-file/252383>\
**Category:** flash\
**Created:** [February 19, 2008, 5:26pm UTC](https://forum.kirupa.com/t/how-to-read-more-than-one-attribute-in-a-xml-file/252383 "2008-02-19T17:26:23Z")\
**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 19, 2008, 5:26pm UTC](https://forum.kirupa.com/t/how-to-read-more-than-one-attribute-in-a-xml-file/252383/1 "2008-02-19T17:26:23Z")

</div>

Hi!

I finally got the code loading an external XML file after lots of tries but I can t read the desc attribute.Can You help me with this doubt?

Here is my code:

```auto

function onLoaded(event:Event):void
{
    xml = new XML(event.target.data);
    var lista :XMLList = xml.photo.attribute("url");
    
    for each (var fotos:XML in lista){
            photos.push(fotos);
    }
    
    photos.reverse();    
    numImgs = photos.length;

    imgLoader.load(new URLRequest(photos[imgPos]));
    imgLoader.contentLoaderInfo.addEventListener(Event.OPEN,onOpen);
    imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    holder.addChild(imgLoader);
}

```
