vb.net - Removing a node with its children in xml -


i have following xml format:

<kml xmlns="http://www.opengis.net/kml/2.2">   <document>     <name>testdoc</name>     <style id="style1">       <polystyle>         <fill>0</fill>       </polystyle>     </style>     <folder>       <name>folder1</name>       <placemark>         <name>placemark1folder1</name>         <lookat>           <longitude>-122.0839597145766</longitude>           <latitude>37.42222904525232</latitude>         </lookat>       </placemark>       <placemark>         <name>placemark2folder1</name>         <lookat>           <longitude>-101.083959</longitude>           <latitude>26.422</latitude>         </lookat>       </placemark>     </folder>     <folder>       <name>folder2</name>       <placemark>         <name>placemark1folder2</name>         <lookat>           <longitude>-96.566556</longitude>           <latitude>14.422</latitude>         </lookat>       </placemark>     </folder>   </document> </kml> 

i want remove nodes inside nodes its( node ) childrens in vb.net ..hence output xml should :::

<kml xmlns="http://www.opengis.net/kml/2.2">   <document>     <name>testdoc</name>     <style id="style1">       <polystyle>         <fill>0</fill>       </polystyle>     </style>    </document> </kml> .. 

how accomplish this...thanx in advance..

nod.parentnode.parentnode.removechild(nod.parentnode)

or u can try

this


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -