# Parse through XML document

**URL:** <https://forum.kirupa.com/t/parse-through-xml-document/173778>\
**Category:** flash\
**Created:** [December 29, 2005, 5:04pm UTC](https://forum.kirupa.com/t/parse-through-xml-document/173778 "2005-12-29T17:04:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)\
**Post date:** [December 29, 2005, 5:04pm UTC](https://forum.kirupa.com/t/parse-through-xml-document/173778/1 "2005-12-29T17:04:53Z")

</div>

Okay, so I have two swf files. A homepage and a sub page. I have a list of elements to select from on the home page:

```auto

Jims Profile
Freds Profile
Bobs Profile

```

When you select say ‘Freds Profile’, I would like to load my subpage.swf which displays 'Freds" profile information.

So here’s my delima. I don’t know how to parse through my xml sheet to retrieve only "Freds Profile’, and I don’t know how to pass that parameter to subpage.swf so it knows to initialize only “Freds” profile information.

If I was building this page in php and retrieving data from a database, I know how I would do it with query strings, but this sort of thing in flash is new to me.

Here is my XML file for reference:

```auto

<profileText>
 <channel>
   <code>jim</code>
   <name>Jim's Profile</name>
   <address>Jim's Address 1</address>
   <desc>Jim's Description</desc>
 </channel>
 <channel>
   <code>fred</code>
   <name>Fred's Profile</name>
   <address>Fred's Address 1</address>
   <desc>Fred's Description</desc>
 </channel>
 <channel>
   <code>bob</code>
   <name>Bob's Profile</name>
   <address>Bob's Address 1</address>
   <desc>Bob's Description</desc>
 </channel>
</profileText>

```

I just want to query my xml file by the code name of the profile. So if I wanted to find Fred…I would query “?code=fred”. How do I do this sort of thing with XML and flash?
