# XML and Objects and Classes

**URL:** <https://forum.kirupa.com/t/xml-and-objects-and-classes/201409>\
**Category:** flash\
**Created:** [September 21, 2006, 12:09am UTC](https://forum.kirupa.com/t/xml-and-objects-and-classes/201409 "2006-09-21T00:09:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DesignerScott](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/designerscott/32/2833_2.png) [@DesignerScott](https://forum.kirupa.com/u/DesignerScott)\
**Post date:** [September 21, 2006, 12:09am UTC](https://forum.kirupa.com/t/xml-and-objects-and-classes/201409/1 "2006-09-21T00:09:02Z")

</div>

I’m trying to pass an xml node from one class to another and still be able to access that node’s properties with no luck.  
I’ll get right into the code for everyone though:  
inside 1.as I have:

```auto

var xmlNode = this.xmlData.firstChild.childNodes[1];
var passThese:Object = new Object;
passThese.passNode = xmlNode;
this.attachMovie('classClip2','otherClass',1,passThese);
trace(xmlNode.childNodes[1].firstChild.nodeValue);//this works! and spits out specific entry.
trace(passThese.passNode)//this works! and spits out entire node
trace(passThese.childNodes[1].firstChild.nodeValue);//this doesn't work.

```

inside 2.as I have

```auto

var passNode:XMLNode;
...
trace(passNode);//this works! and spits out entire node
trace(passNode.childNodes[1].firstChild.nodeValue)//this doesn't work! spits out undefined

```

So it seems like after I put the xmlNode into an object it no longer becomes “searchable” or whatever.  
Any thoughts?
