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: delete x.p[0]; From: 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
|