# XML : Why can't I do this?

**URL:** <https://forum.kirupa.com/t/xml-why-cant-i-do-this/289796>\
**Category:** flash\
**Created:** [June 4, 2009, 8:27pm UTC](https://forum.kirupa.com/t/xml-why-cant-i-do-this/289796 "2009-06-04T20:27:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![odiecreversed](https://avatars.discourse-cdn.com/v4/letter/o/43a26b/32.png) [@odiecreversed](https://forum.kirupa.com/u/odiecreversed)\
**Post date:** [June 4, 2009, 8:27pm UTC](https://forum.kirupa.com/t/xml-why-cant-i-do-this/289796/1 "2009-06-04T20:27:03Z")

</div>

Hey guys,

I can do this:

```auto

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadXML);
loader.load(new URLRequest(" **sample.xml**"));

function loadXML(e:Event):void{
    var xmlBA = new XML(e.target.data);
    trace(xmlBA)
}

```

So… why can’t I do this?

```auto

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadXML);
loader.load(new URLRequest(" **http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/sci/tech/rss.xml**"));

function loadXML(e:Event):void{
    var xmlBA = new XML(e.target.data);
    trace(xmlBA)
}

```

Really frustrating! If anyone could help it’d be awesome! 🙂  
Thanks.
