# XML gallery with sections

**URL:** <https://forum.kirupa.com/t/xml-gallery-with-sections/160721>\
**Category:** flash\
**Created:** [August 28, 2005, 10:31pm UTC](https://forum.kirupa.com/t/xml-gallery-with-sections/160721 "2005-08-28T22:31:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![liquify](https://avatars.discourse-cdn.com/v4/letter/l/e95f7d/32.png) [@liquify](https://forum.kirupa.com/u/liquify)\
**Post date:** [August 28, 2005, 10:31pm UTC](https://forum.kirupa.com/t/xml-gallery-with-sections/160721/1 "2005-08-28T22:31:37Z")

</div>

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:

```
&lt;pic section="web"&gt;
    &lt;image&gt;pathToImage&lt;/image&gt;
   &lt;caption&gt;description&lt;/caption&gt;
 &lt;/pic&gt;
&lt;pic section="print"&gt;
     &lt;image&gt;pathToImage&lt;/image&gt;
    &lt;caption&gt;description&lt;/caption&gt;
  &lt;/pic&gt;

```

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!
