Tracy, that's what I thought too, but the live docs says you can delete
XMLLists (
http://livedocs.adobe.com/flex/201/langref/operators.html#delete_(XML)).
Maybe this is a documentation bug.
Another possibility is that the ".." is getting in the way. I've had
problems with it before where it needed to be replaced with the descendants
method. Try
delete _mapDataProfile.clip.descendants("document")
Try and see if that helps.
- Dan Freiman
On 10/30/07, Tracy Spratt <[EMAIL PROTECTED]> wrote:
>
> I am surprised you are not getting an error. You can delete an XML
> object but not an XMLList.
>
>
>
> You will need to loop over the XMLList and delete the nodes individually:
>
> for (i:int =0;i<p.lenght()… //I never can remember when length is a
> property or method
>
> delete p[i]
>
> …
>
> Tracy
> ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *matt wicks
> *Sent:* Tuesday, October 30, 2007 9:39 AM
> *To:* [email protected]
> *Subject:* [flexcoders] e4X delete question
>
>
>
> Hi all
>
>
>
> I have an xml structure which is like this
>
>
>
> <map>
>
> <clip>hkjkj</clip>
>
> <clip>hh
>
> <document> hxsjka</document>
>
> </clip>
>
> <clip>
>
> <document>kkkkkkk</document>
>
> </clip>
>
> </map>
>
>
>
> And I want to delete the document nodes in one swoop ..
>
>
>
> *var* p:XMLList = _mapDataProfile.clip..document
>
> *delete* _mapDataProfile.clip..document
>
> *var* s:XMLList=_mapDataProfile.clip..document
>
>
>
> but p and s are the same - what am I missing here?
>
>
>
> Thanks !
>
>
>
> Matt
>
>
>