# AS2 XML Loop problem

**URL:** <https://forum.kirupa.com/t/as2-xml-loop-problem/254859>\
**Category:** flash\
**Created:** [March 16, 2008, 2:29pm UTC](https://forum.kirupa.com/t/as2-xml-loop-problem/254859 "2008-03-16T14:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crapitoutjim](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@crapitoutjim](https://forum.kirupa.com/u/crapitoutjim)\
**Post date:** [March 16, 2008, 2:29pm UTC](https://forum.kirupa.com/t/as2-xml-loop-problem/254859/1 "2008-03-16T14:29:00Z")

</div>

Hi There,

Its quite some time since I posted on Kirupa but its good to be back!! I am having a bit of a nitemare problem with actionscript 2 and xml. I have 4 instances of the same mc on my stage, these are named template0, template1, template2, template3. This mc contains a text box called price\_txt. I also have an xml doc called products.xml. What I want to do is display a differnet price in each of the 4 mc. I am using XPath to refernece my xml but am having a few problems working out how to construct my for loop(s).

I have attached a simple example of what I am trying to do to this post, any help would be very gratefully appreceated.

Cheers

James
