XML gallery with sections

Hi again

I’m trying to split my gallery into multiple sections. I’m using kirupa’s tutorial of XML gallery.

Should i use attributes in xml? like:

<pic section="web">
    <image>pathToImage</image>
   <caption>description</caption>
 </pic>
<pic section="print">
     <image>pathToImage</image>
    <caption>description</caption>
  </pic>

If so how can make flash read this?

i think i need something like this…

if (section=“web”){
display image x
display caption x}
if (section=“pint”){
display image y
display caption y}

or is it better to make a different xml file?

thanks again!