I can't see how this would be possible.  XML is essentially a string.
When you pass a complex object via xml, you have to serialize it into a
bunch of metadata that describes the object, so the receiver can
deserialize it back into an object instance.  Like SOAP.

 

What do you need to do?

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Frank Sommers
Sent: Thursday, June 19, 2008 6:29 PM
To: [email protected]
Subject: [flexcoders] Adding non-XML property to an XML object

 

Hi,

I'm trying to figure out how to add a non-XML property to an XML
object. The XML object implements both the . and [] operators so that
anything assigned via these operators becomes XML or XMLList. I would
like to somehow revert to the regular behavior for the . and []
operators so that I can assign non-XML properties to an XML object.

For example, I may have an XML object as in:

var x:XML = <xmlobj/>;

And a variable, such as:

var d:Date = new Date();

I would like to be able to assign the value of d as a Date to x. With
a regular object, this works just fine:

var o:Object = new Object();
o.date = d;

But using the same notation for the XML object creates an XMLList,
i.e., a child of the XML object:

x.date = d;
// x.date is now an XMLList.

Is there a way to override this behavior so that d is added as a Date?

Thanks,

-- Frank

 

Reply via email to