# Unloading XML file

**URL:** <https://forum.kirupa.com/t/unloading-xml-file/243693>\
**Category:** flash\
**Created:** [November 9, 2007, 6:16pm UTC](https://forum.kirupa.com/t/unloading-xml-file/243693 "2007-11-09T18:16:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![klavier](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@klavier](https://forum.kirupa.com/u/klavier)\
**Post date:** [November 9, 2007, 6:16pm UTC](https://forum.kirupa.com/t/unloading-xml-file/243693/1 "2007-11-09T18:16:11Z")

</div>

Hello all,

I’m having problems loading a new XML file.  
I have a single XML loading into an MC initially.  
Then when I try to load in a new file with a button - the previously loaded XML file doesn’t want to leave. Maybe it’s just too happy where it is? ![](http://forum.kirupa.com/uploads/kirupa/1800/8c9841d03b4dffbb.gif)

```auto

var imagelibrary = new XML();
imagelibrary.ignoreWhite = true;
imagelibrary.onLoad = function(success) {
    if (success) {
       gallery_mc.loadPic(0);
   } else {
       error_txt.text = "Error retrieving file.";
   }
};
imagelibrary.load("imagelibrary.xml");

```

Here’s me trying to load a new file.

```auto

button1.onRelease = function() {
     imagelibrary.load("newXMLfile.xml");
}

```

I’ve tried removing the movie clip as well as deleting the xml… no luck.  
When i remove the movie clip and try to load up a new file - the same file comes back! ☹

Any ideas? Thanks a bunch!
