# Very Simple? Get XML node

**URL:** https://forum.kirupa.com/t/very-simple-get-xml-node/235953
**Category:** Uncategorized
**Created:** [August 16, 2007, 12:44am UTC](https://forum.kirupa.com/t/very-simple-get-xml-node/235953 "2007-08-16T00:44:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Blommestein](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Blommestein](https://forum.kirupa.com/u/Blommestein)
#### Post date: [August 16, 2007, 12:44am UTC](https://forum.kirupa.com/t/very-simple-get-xml-node/235953/1 "2007-08-16T00:44:57Z")

</div>

E4X is much easier. In AS2 I can’t get the value from an xml node, without including the tags. (Not using attributes, by the way)

A PHP script returns to flash the following string:

\<data\>  
\<x\>3\</x\>  
\<y\>2\</y\>  
\</data\>

I parse the string to an xml object using new XML() with the string as a parameter of the constructor.

The I set ignoreWhite to true. Finally, I call:

trace(myXML.firstChild.firstChild);

And I get “\<x\>3\</x\>”.

I simply want the 3. I’ve tried using myXML.firstChild.firstChild.nodeValue but that returns as null.

Can anyone help?  
Thanks in advance. 🙂
