Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

how to delete the whole XMLNode

$
0
0

hi

   my code is like that:  

XmlNodeList nodeList = root.SelectNodes("//item[@key='" + Key + "']");              
                if (nodeList.Count > 1)
                {
                    foreach (XmlNode item in nodeList)
                    {                        
                        item.RemoveAll();
                    }
                } 

     then i found the xml file like

  <item />
  <item />

     may i ask is it possible to delete all,inclduing   <item />?

    thank u very much

best regards

martin

   

Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>