Xml -> php -> html

hello…i’m currently working on a project and i’m in need of a dynamic photo gallery for the site…and i would like for it to be in HTML…what i want is to have an xml file with all the information of the galleries in it:

  <gallery directory="../photos/uploads/" thumbs="../photos/uploads/thumbs/" file="51716042_l.jpg" title="Band Pictures" caption="we're cooler than you">
	<image file="51716042_l.jpg" title="Hawaii" caption="hawaiians are so hawaiian" />
	<image file="51801565_l.jpg" title="Wide-eyed wes" caption="what the..." />
	<image file="142391447_l.jpg" title="Mr. moves" caption="so flamboyant" />
	<image file="142391784_l.jpg" title="Rockin' danny" caption="wild and crazy is he" />
	<image file="142392907_l.jpg" title="Cut Shallow on tour" caption="not anymore" />
	<image file="142394266_l.jpg" title="The whole gang" caption="the only good one of nate...and you can still barely see him" />
  <gallery directory="../photos/uploads/" thumbs="../photos/uploads/thumbs/" file="cssicck500.jpg" title="Band Images" caption="we rule all">
	<image file="csmyspace.jpg" title="Good day sir..." caption="I SAID GOOD DAY!!" />
	<image file="cssicck500.jpg" title="Epitome of awesome" caption="you heard me, shoot" />

and what i want it to have a page where it shows the galleries and then when you click on the galleries it will load (in the same frame) the pictures of the gallery you pressed…i have a small idea of how i’m gonna do this:

load the xml file into php…and make an array for each gallery that has all the gallery data (such as the image directories, title and caption, and id#(0, 1, 2, etc…)) and then when you click on one…depending on which gallery you click…it will get the id number…and for instance if the number is “0” then it will load the images from the first gallery in the xml page…or if the number is “1” it will load the images from the second gallery…and so on…but i’m just kinda stumped as to how to do this…i’m fairly good with php…i just don’t know anything about parsing xml with php…and i’ve tried tutorials and such…but they haven’t been much help…