Adding an XML attribute

I’m working on an XML gallery and I would like to have an attribute in the XML parent node with a title for the gallery. Due to my limited noobie abilities I have had no luck re-writing the actionscript to work with the attribute. Any help is greatly appreciated.

 
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images galleryname="Gallery Name">
 <pic>
        <image>images/01.jpg</image>
        <caption>Caption #1</caption>
        <thumbnail>images/thumbs/01.jpg</thumbnail>
  </pic>
 </images>

 
var id, current;
var k = 0, p = 0;
var slide = 1;
function loadXML(loaded) {
 if (loaded) {
  xmlNode = this.firstChild;
  image = [];
  description = [];
  thumbnails = [];
  total = xmlNode.childNodes.length;
  for (i=0; i<total; i++) {
   image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
   description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
   thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
   thumbnails_fn(i);
  }
  firstImage();
 } else {
  content = "file not loaded!";
 }
}
preloader.preload_bar._xscale=0
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images2.xml");