# Buttons and diffrent xml files

**URL:** https://forum.kirupa.com/t/buttons-and-diffrent-xml-files/271576
**Category:** Uncategorized
**Created:** [September 24, 2008, 10:31pm UTC](https://forum.kirupa.com/t/buttons-and-diffrent-xml-files/271576 "2008-09-24T22:31:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wtr](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@wtr](https://forum.kirupa.com/u/wtr)
#### Post date: [September 24, 2008, 10:31pm UTC](https://forum.kirupa.com/t/buttons-and-diffrent-xml-files/271576/1 "2008-09-24T22:31:17Z")

</div>

My goal is:

There is a menu and there is an xmlgallery

Xmlgallery =\> myXML.load(xxx);

the menu has to fill in the xxx or replace it…

for example

when u press on menubutton1 =\> the gallery loads xml-file “gallery1.xml”  
when u press on menubutton2 =\> the gallery loads xml-file “gallery2.xml”

So the buttons have to clean myXML and replace it with another xml-file.

Is this possible? I can’t find how to unload the previous xml-file… so it can load another

thx in advance!
