# E4X: traversing xml using attribute name

**URL:** <https://forum.kirupa.com/t/e4x-traversing-xml-using-attribute-name/311997>\
**Category:** flash\
**Created:** [July 22, 2010, 6:24am UTC](https://forum.kirupa.com/t/e4x-traversing-xml-using-attribute-name/311997 "2010-07-22T06:24:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asscripter](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@asscripter](https://forum.kirupa.com/u/asscripter)\
**Post date:** [July 22, 2010, 6:24am UTC](https://forum.kirupa.com/t/e4x-traversing-xml-using-attribute-name/311997/1 "2010-07-22T06:24:49Z")

</div>

Hi, This might sound really simple, but I have spent multiple hours on it to find no result. Here is the situation. MY xml structure looks like this:

```auto
<root>
      <RES>
            <R N="1">
	            <FM>11580</FM>      
            <SEZ N="name" V="dummy name"/>      
                   <SEZ N="customData" V="customValue1"/>
                   <SEZ N="width" V="247"/>      
                   <SEZ N="height" V="247"/>      
                   <S>... WOW...Life sure is a mystery</S>      
        </R>
              <R N="2">
	            <FM>11582</FM>      
                  <SEZ N="name" V="dummy name"/>      
                  <SEZ N="width" V="247"/>      
                  <SEZ N="height" V="247"/>      
                  <S>... WOW...Life sure is a mystery</S>      
            </R>
            <R N="3">
	            <FM>11584</FM>      
                  <SEZ N="name" V="dummy name"/>      
                  <SEZ N="customData" V="customValue2"/>
                  <SEZ N="width" V="247"/>      
                  <SEZ N="height" V="247"/>      
              <S>... WOW...Life sure is a mystery</S>      
            </R>    
      </RES>
</root>

```

Now following code:

root.RES…SEZ.(@N == “customData”)

returns me  
\<SEZ N=“customData” V=“customValue1”/\>  
\<SEZ N=“customData” V=“customValue2”/\>

But I am not able to refer to the corresponding parent \<R\> so that I can traverse it to retrieve corresponding \<SEZ N=“name” V=“dummy name”/\>

Please help…
