# Can Flash read the text length of XML?

**URL:** <https://forum.kirupa.com/t/can-flash-read-the-text-length-of-xml/186294>\
**Category:** flash\
**Created:** [April 20, 2006, 10:48am UTC](https://forum.kirupa.com/t/can-flash-read-the-text-length-of-xml/186294 "2006-04-20T10:48:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![billystar](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/billystar/32/9258_2.png) [@billystar](https://forum.kirupa.com/u/billystar)\
**Post date:** [April 20, 2006, 10:48am UTC](https://forum.kirupa.com/t/can-flash-read-the-text-length-of-xml/186294/1 "2006-04-20T10:48:50Z")

</div>

I have been going through Senocular’s excellent XML tuts and am trying to build a function of my own.

In his ‘squirrel menu’ he uses a variable called ‘item\_spacing’ to define the gap between menu items. When new menu items are generated, this variable defines the spacing.

My question: Can Flash read the text length of the node when the XML has been parsed?

so instead of the variable just being  
\*\*  
var item\_spacing = 20;\*\*

it would be

\*_var item\_spacing = items_.childNodes[1].text.length;

\*\*or something similar to above as I am a XML noobie!

What I want to achieve is a menu which can tell the length of the previous menu item so that when there is a new entry, it can position itself automatically.

Thanks for your help, Billy
