# Traversing XML structures: Performance question

**URL:** <https://forum.kirupa.com/t/traversing-xml-structures-performance-question/229422>\
**Category:** flash\
**Created:** [June 17, 2007, 1:16am UTC](https://forum.kirupa.com/t/traversing-xml-structures-performance-question/229422 "2007-06-17T01:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![costa](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@costa](https://forum.kirupa.com/u/costa)\
**Post date:** [June 17, 2007, 1:16am UTC](https://forum.kirupa.com/t/traversing-xml-structures-performance-question/229422/1 "2007-06-17T01:16:38Z")

</div>

Dear all,

I just want to ask you if these statements are equal from a performance perspective.

var myXML:XML=  
\<catalogue\>  
\<groups\>  
\<movie id=“0” name=“mc1” x=“0” y=“0” /\>  
\<movie id=“1” name=“mc2” x=“192” y=“0”/\>  
\<movie id=“2” name=“mc3” x=“96” y=“0” /\>  
\<movie id=“3” name="mc3 x=“448” y=“0” /\>  
\</groups\>  
\</catalogue\>

Statement 1  
myXML.groups[2];

Statement 2  
myXML.groups.(@id ==2);

In my scenery, I got 1000 lines in the XML.  
Sorry to ask, but I do not know how to measure them.

Thanks in advance
