# Detecting number of attributes in childNode

**URL:** <https://forum.kirupa.com/t/detecting-number-of-attributes-in-childnode/110932>\
**Category:** Uncategorized\
**Created:** [May 21, 2004, 3:28am UTC](https://forum.kirupa.com/t/detecting-number-of-attributes-in-childnode/110932 "2004-05-21T03:28:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![d2kagw](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/d2kagw/32/539_2.png) [@d2kagw](https://forum.kirupa.com/u/d2kagw)\
**Post date:** [May 21, 2004, 3:28am UTC](https://forum.kirupa.com/t/detecting-number-of-attributes-in-childnode/110932/1 "2004-05-21T03:28:53Z")

</div>

Hi there everyone,

im trying to write a handfull of XML functions in AS2.0  
and im trying to find a way of getting flash to detect  
the number of attributes in a childNode.

_\<item name=“aaron” location=“sydney” sex=“male”/\>_  
as in finding out how many of these ^ there are in each item.

any ideas as to how I would do this? I’ve tried for…in… statements  
and even trying to access them as objects i.e. …ode[0].attributes[“name”]  
but it never works - I always have to hard code…ode[0].attributes.name  
to get the value.

im sure theres a way to do this, there has to be a way.  
please show me the way :ne:

Thanks in advance !!!
