While creating a sample application for some class content the other day, I ran into an XML/E4X situation that I’d never encountered before. It is pretty basic – deleting a node from XML. How does one do it? With the delete keyword of course!
For example:
[as]var myXML:XML =
// Delete the Med. Soda node
// Output the XML
trace( myXML.toXMLString() );
// Result
//
//
//
//
//
//
delete myXML.item[2];
// Output the edited XML
trace( myXML.toXMLString() );
// Result
//
//
//
//
//
Man, E4X is so simple!
|
|
download: Delete Node Example (4.78KB) added: 04/09/2009 clicks: 896 description: Code source (.FLA) for delete XML node using E4X in ActionScript 3 sample |




noo, really ?? -_-
Yeah really. The post might be helpful to someone – unlike your comment. -_-