# Delete nodes from external XML by value

**URL:** <https://forum.kirupa.com/t/delete-nodes-from-external-xml-by-value/269147>\
**Category:** flash\
**Created:** [August 23, 2008, 10:41am UTC](https://forum.kirupa.com/t/delete-nodes-from-external-xml-by-value/269147 "2008-08-23T10:41:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsuser](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dsuser](https://forum.kirupa.com/u/dsuser)\
**Post date:** [August 23, 2008, 10:41am UTC](https://forum.kirupa.com/t/delete-nodes-from-external-xml-by-value/269147/1 "2008-08-23T10:41:41Z")

</div>

Hi all,

After days of searching for solution - I am desperate and look for help.

I need to remove nodes from the xml loaded into Flash from external xml file. I need to remove folder nodes and also inside nodes by id and than insert the nodes in Flash tree using the tree.dataProvider method. Maybe there is a better way!

This is my example:  
I need to display only the folders with id 12 and the nodes inside those folders with id 12.

This is an example xml file:  
\<xml\>  
\<folder label=“label-1” id=“10”\>  
\<node label=“node label” id=“10” /\>  
\<node label=“node label” id=“10” /\>  
\</folder\>  
\<folder label=“label-2” id=“12”\>  
\<node label=“node label” id=“10” /\>  
\<node label=“node label” id=“12” /\>  
\<folder label=“label-8” id=“12”\>  
\<node label=“node label” id=“12” /\>  
\<node label=“node label” id=“8” /\>  
\<node label=“node label” id=“359” /\>  
\<node label=“node label” id=“12” /\>  
\</folder\>  
\</folder\>   
\<folder label=“label-3” id=“10”\>  
\<node label=“node label” id=“12” /\>  
\</folder\>   
\<folder label=“label-4” id=“12”\>  
\<node label=“node label” identifier=“10” /\>  
\<node label=“node label” identifier=“12” /\>   
\</folder\>  
\</xml\>

I am searching for solution for 1 week and I do not know what to do. I am beginner in Flash and do not understand a lot from the actionscript. I downloaded and use the CS3 version and actionscript 2.

Please help me with the solution of this problem:  
How to traverse the xml loaded into Flash and remove the nodes that do not confirm with the given id.

Thank you!
