XML childNodes help please


I am trying to dynamically build a string that parses part of my XML document.

I end up with a string like this:
myXML = “menu_xml.childNodes[0]”

but every time i try and run it i get Undefined.

Are you not allowed to use:
myXML = “menu_xml.childNodes[”+i+"]"

Sorry if I am being dumb.

p.s. If I just trace(menu_xml.childNodes[0]) it works fine.