List,
Does anyone know how to delete nodes from an xml using ex4 and a
condition specific in the node. I really need to delete these nodes.
For example:
var tXML:XML = new XML(
<data><image_conf>
<randomImage id="1" delete="true"/>
<randomImage id="2" delete="true"/>
<randomImage id="3" />
<randomImage id="4"/>
</image_conf></data>)
var pXML:XMLList = tXML.image_conf;
When i then use this:
delete pXML.randomImage.(attribute("delete") == "true")[0]
Not all the nodes with @delete = 'true' are removed.
trace(pXML.toXMLString())
// this is what is the output looks like
<image_conf>
<randomImage id="2" delete="true"/>
<randomImage id="3"/>
<randomImage id="4"/>
</image_conf>
Much appreciated.
Jiri
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders