Buttons and diffrent xml files

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!