Oh, you said the second one…

 

delete x.p[1];

delete x.children ()[1];

 

http://livedocs.macromedia.com/labs/1/flex/langref/operators.html#delete_(XML)

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Geoffrey Williams
Sent: Friday, March 17, 2006 11:47 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] remove child from xml

 

delete x.p[0];

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sonja Duijvesteijn
Sent: Friday, March 17, 2006 5:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] remove child from xml

 

I've been looking through the flex 2 actionscript and mxml reference trying to find a way to remove a child from the xml.

var x:XML = 

    <body>

        <p>Paragraph 1</p> 

        <p>Paragraph 2</p>


    </body>



I know I can add children at any specific location, but I would also like to be able to remove the second child for example. Is there any way to do this? 


Perhaps I've been overlooking some other source of documentation where this is explained. Any hints as where to look would be much appreciated.



Kind regards,

Sonja Duijvesteijn



 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to