# E4X madness: tracing simple nodes

**URL:** <https://forum.kirupa.com/t/e4x-madness-tracing-simple-nodes/305436>\
**Category:** flash\
**Created:** [February 25, 2010, 7:27am UTC](https://forum.kirupa.com/t/e4x-madness-tracing-simple-nodes/305436 "2010-02-25T07:27:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![watcher](https://avatars.discourse-cdn.com/v4/letter/w/77aa72/32.png) [@watcher](https://forum.kirupa.com/u/watcher)\
**Post date:** [February 25, 2010, 7:27am UTC](https://forum.kirupa.com/t/e4x-madness-tracing-simple-nodes/305436/1 "2010-02-25T07:27:37Z")

</div>

Hi All,

To keep things simple, here is outlined the root-cause of my problem:  
[http://www.ultrashock.com/forums/xml/how-to-set-xml-node-value-as3-123595.html](http://www.ultrashock.com/forums/xml/how-to-set-xml-node-value-as3-123595.html)

So basically if i trace an XML object, i cant get to its text value via its root node name.

Now check this out:

```auto

var xml1:XML = new XML( "<rnd><image>image1 text</image></rnd>" );
trace( "xml1:
" + xml1.image);
/*
TRACES
xml1:
image1 text
*/

var xml2:XML = new XML( "<rnd><image>image1 text</image><image>image2 text</image></rnd>" );
trace( "xml2:
" + xml2.image );
/*
TRACES
xml2:
<image>image1 text</image>
<image>image2 text</image>
*/

```

and now the question:  
HOW CAN I GET THE RESULT OF  
trace( "xml1:  
" + xml1.image);  
TO BE WRAPPED IN THE \<image/\> TAG ALSO ?

eg:  
\<image\>image1 text\</image\>

CONSIDERING THAT:  
i can not use xml1.toXMLString() because i actually need the pointer, and toXMLString will remove pointers to my xml1.parent (i am trying to do this on nodes of structurally much more complex XML)

-mike

**EDIT**  
priority decreased; im not anymore direly interested in the answer as i’ve adjusted the flash-side to work with the current output. Post just for curiosity and future stumblers :).
