title: Removing item from XML file
body: <p>I have the following XML structure:</p>
  
  <pre><code>&lt;Catalog&gt;
    &lt;sensors&gt;
      &lt;Item&gt;
        &lt;Item_Number&gt;Mblah123&lt;/Item_Number&gt;
        &lt;Category&gt;Vibration&lt;/Category&gt;
        &lt;Language&gt;English&lt;/Language&gt;
        &lt;Description&gt;desc&lt;/Description&gt;
        &lt;Long_Description&gt;&lt;![CDATA[wow!]]&gt;&lt;/Long_Description&gt;
        &lt;BOM&gt;&lt;![CDATA[]]&gt;&lt;/BOM&gt;
        &lt;Recommended_Parts&gt;&lt;/Recommended_Parts&gt;
        &lt;Picture&gt;pic.jpg&lt;/Picture&gt;
      &lt;/Item&gt;
    &lt;/sensors&gt;
    &lt;technology&gt;
      &lt;Item&gt;
        &lt;Item_Number&gt;test003&lt;/Item_Number&gt;
        &lt;Category&gt;Vibration&lt;/Category&gt;
        &lt;Language&gt;Japanese&lt;/Language&gt;
        &lt;Description&gt;description&lt;/Description&gt;
        &lt;Long_Description&gt;&lt;![CDATA[rsxgrdxgtxtxg]]&gt;&lt;/Long_Description&gt;
        &lt;BOM&gt;
          &lt;![CDATA[xwthgwtg
      trxthtrh
      trxeyrxjyetj
      txrhueyjh]]&gt;
        &lt;/BOM&gt;
        &lt;Recommended_Parts&gt;xtrwth&lt;/Recommended_Parts&gt;
        &lt;Picture&gt;pic.jpg&lt;/Picture&gt;
      &lt;/Item&gt;
    &lt;/technology&gt;
  &lt;/Catalog&gt;
  </code></pre>
  
  <p>In my .NET page, I have this code behind that's used for removing specific items:</p>
  
  <pre><code>Private Sub DeleteData(ByVal fileName As String, ByVal strSelection As String)
      lblData.Text = ""
      Dim strContent As String = ""
  
      Dim m_xmld As XmlDocument
      'Dim m_nodelist As XmlNodeList
      Dim m_node As XmlNode
      'Create the XML Document
      m_xmld = New XmlDocument()
      'Load the Xml file
      m_xmld.Load(fileName)
  
      m_node = m_xmld.SelectSingleNode(strSelection)
  
      m_node.RemoveAll()
  
      m_xmld.Save(fileName)
  
      MsgBox("Entry removed!")
  End Sub
  </code></pre>
  
  <p>But when I use it on, say the technology item, it retains the  node:</p>
  
  <pre><code>&lt;Catalog&gt;
    &lt;sensors&gt;
      &lt;Item&gt;
        &lt;Item_Number&gt;Mblah123&lt;/Item_Number&gt;
        &lt;Category&gt;Vibration&lt;/Category&gt;
        &lt;Language&gt;English&lt;/Language&gt;
        &lt;Description&gt;desc&lt;/Description&gt;
        &lt;Long_Description&gt;&lt;![CDATA[wow!]]&gt;&lt;/Long_Description&gt;
        &lt;BOM&gt;&lt;![CDATA[]]&gt;&lt;/BOM&gt;
        &lt;Recommended_Parts&gt;&lt;/Recommended_Parts&gt;
        &lt;Picture&gt;pic.jpg&lt;/Picture&gt;
      &lt;/Item&gt;
    &lt;/sensors&gt;
    &lt;technology&gt;
      &lt;Item&gt;
      &lt;/Item&gt;
    &lt;/technology&gt;
  &lt;/Catalog&gt;
  </code></pre>
  
  <p>How do I specify that even the Item tags need to be removed?</p>
  
  <p>TIA!</p>
  
  <p><b>Addendum</b></p>
  
  <p>I call the sub via:</p>
  
  <p>DeleteData(MapPath("Catalog1.xml"), "/Catalog/" + ddlL1Cat.SelectedValue.ToString + "/Item[Item_Number='" + ddlItemNum.SelectedValue + "']")</p>
  
  <p>strSelection would have this kind of value:  <strong>"/Catalog/technology/Item[Item_Number='test003']"</strong></p>