# Question on XML & looping

**URL:** <https://forum.kirupa.com/t/question-on-xml-looping/189993>\
**Category:** flash\
**Created:** [June 7, 2006, 9:27pm UTC](https://forum.kirupa.com/t/question-on-xml-looping/189993 "2006-06-07T21:27:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevs102](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@stevs102](https://forum.kirupa.com/u/stevs102)\
**Post date:** [June 7, 2006, 9:27pm UTC](https://forum.kirupa.com/t/question-on-xml-looping/189993/1 "2006-06-07T21:27:42Z")

</div>

I think this question is a bit more advanced as I have built several XML/Flash based dynamic page including Flash XML editors, etc.

For some reason I’m having trouble starting this project. Basically I want to create a proff of concent of an Interactive Origizational Chart for work. I’ll have an XML doc that would look something like this I imagine:

```auto

<?xml version="1.0" encoding="iso-8859-1"?>
     <Employees>
          <employee name="Employee" title="Education Solutions Team Lead" dept="BEVS">
               <employee name="Employee" title="Learning Scientist" dept="BEVS">
                    <employee name="Employee" title="Learning Technologist" dept="BEVS" />
                    <employee name="Employee" title="Learning Technologist" dept="BEVS" />
                    <employee name="Employee" title="Learning Technologist" dept="BEVS" />
          </employee>
          <employee name="Employee" title="Learning Scientist" dept="BEVS" />
          <employee name="Employee" title="Learning Architect" dept="BEVS" />
     </employee>
</Employees>

```

Since with lots of employees this document could become very nested. I need to figure out how to loop through and place MC’s on the stage for each employee. Then see if it has childNodes and add a MC and attach illustrating manager/employee relation. (I hope this makes sence)

I know how to do it manually while looping but I figure there might be a better way usuing more functions, etc.

I really could use some advance help (Senocular, looking at you :ne: )

Thanks so much!
