# XML for breakfast?

**URL:** <https://forum.kirupa.com/t/xml-for-breakfast/267029>\
**Category:** flash\
**Created:** [July 27, 2008, 8:43pm UTC](https://forum.kirupa.com/t/xml-for-breakfast/267029 "2008-07-27T20:43:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![odiecreversed](https://avatars.discourse-cdn.com/v4/letter/o/43a26b/32.png) [@odiecreversed](https://forum.kirupa.com/u/odiecreversed)\
**Post date:** [July 27, 2008, 8:43pm UTC](https://forum.kirupa.com/t/xml-for-breakfast/267029/1 "2008-07-27T20:43:42Z")

</div>

With the XML below I’m trying to go through whichever “Item” I want and access it’s “itemImage’s”.

I’m trying to do it like this at the moment which is… well… not the right syntax.

```auto
trace(rootGlobal.xml.Item.mainImages[2].itemImage.text()[3])

```

I want to specify which portfolio item and the item image… so output i’d want for the example above is “images/portfolioImage2-3.jpg”

```auto
   
<portfolioItems>
      <Item>
        <id>1</id>
        <ItemColour>1</ItemColour>
        <orientation>P</orientation>
        <itemTitle>Test Item</itemTitle>
        <itemPreviewImage>previewImages/previewImage1.jpg</itemPreviewImage>
        <mainImages>
            <itemImage>images/portfolioImage1-1.jpg</itemImage>
            <itemImage>images/portfolioImage1-2.jpg</itemImage>
            <itemImage>images/portfolioImage1-3.jpg</itemImage>
            <itemImage>images/portfolioImage1-4.jpg</itemImage>
            <itemImage>images/portfolioImage1-5.jpg</itemImage>
        </mainImages>
        <itemDescription>In this image there is some ***s.</itemDescription>
    </Item>
    <Item>
        <id>2</id>
        <ItemColour>1</ItemColour>
        <orientation>P</orientation>
        <itemTitle>Test Item</itemTitle>
        <itemPreviewImage>previewImages/previewImage2.jpg</itemPreviewImage>
        <mainImages>
            <itemImage>images/portfolioImage2-1.jpg</itemImage>
            <itemImage>images/portfolioImage2-2.jpg</itemImage>
            <itemImage>images/portfolioImage2-3.jpg</itemImage>
            <itemImage>images/portfolioImage2-4.jpg</itemImage>
            <itemImage>images/portfolioImage2-5.jpg</itemImage>
        </mainImages>
        <itemDescription>In this image there is some mechanised geese. Look at them hop.</itemDescription>
    </Item>
</portfolioItems>

```

Hope there are some XML fiends out there,  
any help would be great.  
Thanks
