Dustyn,
This should do it.
private function testXML():void {
var xml:XML =
<root><level><detail></detail></level><level><detail></detail></level></root>
var test:XML = xml.copy();
delete test..*.detail;
trace(test.toXMLString());
}
Ben Stucki
-----------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C.
metro area. If interested contact [EMAIL PROTECTED]
----------------------------------------
From: "iondisc" <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2007 7:33 PM
To: [email protected]
Subject: [flexcoders] Flex 2 XML manipulation question
Does anyone know a way to suppress/remove specific nodes from an
XML/XMLList or XMLCollection?
I have say this XML:
<root>
<level>
<detail>
</detail>
</level>
<level>
<detail>
</detail>
</level>
</root>
I want to make a copy of this XML (could be either of the three types of
XML objects) and remove the <detail> nodes from every node no matter
what hiarchy they are in.
Thanks in advance,
Dustyn Eskelson