This does appear to be a browser/player specific issue, since it works
for me under other circumstances.
For anyone following, the goal was to delete the children on a node by
using setChildren() to assign an empty XMLList.
All these work for me under IE:
xmlNode.setChildren(<></>); //WORKS
xmlNode.setChildren(new XMLList()); //WORKS
xmlNode.setChildren(xmlNode.EXPR_THAT_RETURNS_NO_NODES); //WORKS
Tracy
From: [email protected] [mailto:[email protected]] On
Behalf Of Tracy Spratt
Sent: Monday, December 01, 2008 4:30 PM
To: [email protected]
Subject: RE: [flexcoders] Re: Crash of safari, firefox using
XML.setChildren for XML in a XMLListCollection
I think the OP was attempting to delete all of the childern of a node by
assigning an empty XMLList. While this seems reasonable, I do not
believe it will work, at least, I was unable to do it this way.
Tracy
From: [email protected] [mailto:[email protected]] On
Behalf Of valdhor
Sent: Monday, December 01, 2008 10:49 AM
To: [email protected]
Subject: [flexcoders] Re: Crash of safari, firefox using XML.setChildren
for XML in a XMLListCollection
The reason it is failing is because of the following line:
data.setChildren( new XMLList() );
You are passing the setChildren method a memory location of an empty
list.
This should give an error rather than crashing the browser.
--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "shauncutts" <sh...@...> wrote:
>
> Thanks... I'll file one.
>
> But... why is it failing? In my mind, this should delete the node <b/>
> from <a> <b/> </a>.
>