How to query xml once loaded?

**Background: **

Basically in my company we use Flash with XML to create traininig materials. One of the pages we create is full of links to other swf files to load for resources (basically static pages with a picture and linked mp3 files).

The main page that houses all these links loads an xml page then we have these “link movies” that call upon a node of the xml. Basically on the movie clip the code is:

 
onClipEvent (load) {
 
//Set the name of the XML document
this.XMLDocName = "XML/View_Resources.xml"
 
//Set the node variable
this.NodeNumber = 13;
}

This code tells each link movie what node to load depending on the “this.NodeNumber = x;”.

These pages are time consuming to build and not as dynamic as I’d like them to be.

What I’m trying to do:

Basically load the xml and somehow figure out how many sub items are in the xml within a section. Then I can use that to [color=black][font=Times New Roman]dynamically [/font][/color]place the “link movies” on the stage, etc etc. I’m getting pretty good and actionscript, etc, but XML still gets me a bit confused at times.

Example of XML page:

 
<?xml version="1.0" encoding="iso-8859-1"?>
<Links> **[color=red]<-- Everything is inside this tag[/color]**
<ChallengeOne> <-- This starts one sections
		[color=red] **<-- Each rescource has the following xml -->**[/color]
		<link>a) Resource Name - Author Name (x:xx)
			 <URL>file.swf</URL>
		</link> 
	 [color=red]**<-- End of each resource xml. Each rsc has one of those sets -->**[/color]
 
</ChallengeOne>
 
<ChallengeTwo> 
		**[color=red]<-- This would be a whole set of stuff for the next section -->**
**[/color]**</ChallengeTwo>
 
</Links>