# XML: Pick and choose specific data and disregard other

**URL:** <https://forum.kirupa.com/t/xml-pick-and-choose-specific-data-and-disregard-other/327521>\
**Category:** flash\
**Created:** [March 6, 2012, 10:08pm UTC](https://forum.kirupa.com/t/xml-pick-and-choose-specific-data-and-disregard-other/327521 "2012-03-06T22:08:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![monocular](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@monocular](https://forum.kirupa.com/u/monocular)\
**Post date:** [March 6, 2012, 10:08pm UTC](https://forum.kirupa.com/t/xml-pick-and-choose-specific-data-and-disregard-other/327521/1 "2012-03-06T22:08:34Z")

</div>

Yup, I’m really a complete nOOb when it comes to Flash and / or XML but I managed to write some PHP which writes some XML including the following:

\<?xml version=“1.0”?\>  
\<subjects\>  
\<subject\>  
\<ID\>1\</ID\>  
\<menu\_name\_ice\>Bóndabærinn\</menu\_name\_ice\>  
\<menu\_name\_eng\>The farm\</menu\_name\_eng\>  
\<menu\_name\_ger\>Der Bauernhof\</menu\_name\_ger\>  
\<menu\_name\_fre\>La ferme\</menu\_name\_fre\>  
\<position\>1\</position\>  
\<visible\>1\</visible\>  
\</subject\>  
etc. etc…  
\</subjects\>

and what I need to do is sort of like this:

function ParseSubjects(subjectsInput:XML):void {  
var visibleList:XMLList = subjectsInput.subject.visible;  
for each (var visibleElement:XML in visibleList){  
if (visibleElement == “1”){

```
		And well... this is where I'm stumped. What I need to do is read "position" and "menu_name_ice" (or in fact any of the "menu_name_*" but let's start with the first one) and, using Kirupa's excellent tutorial, that worked just fine except I need to read **just one**"subject" at a time, not all of them (there are plenty more, all in the same syntax).

```

I’m using “position” to determine the posting order of “menu\_name\_\*” to the stage and “visible” to determine whether or not to do so.  
Any and all help would be greatly appreciated, including a nudge or a pointing to a tutorial that deals with this specific problem. 🙂
