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