Question on XML & looping

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:


<?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!