<?xml version="1.0" encoding="utf-8" ?> - <!-- XML Database. --> - <AdminTools> - <App> <Name>Test1</Name> <Path>C:\Users\zachary.shupp\Documents\Tools\Zack's MMC.msc</Path> <Icon>5</Icon> </App> - <App> <Name>Test2</Name> <Path>C:\Users\zachary.shupp\Documents\Tools\Zack's MMC.msc</Path> <Icon>1</Icon> </App> </AdminTools>
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click ' Load the XmlDocument. Dim xd As New XmlDocument() xd.Load(Application.StartupPath & "\Tools.xml") Dim nod As XmlNode = xd.SelectSingleNode("/AdminTools/app[@Name='Test1']") If nod IsNot Nothing Then nod.ParentNode.RemoveChild(nod) MessageBox.Show("Deleted") Else MessageBox.Show("Unable to Delete") End If ' Save the Xml. xd.Save(Application.StartupPath & "\Tools.xml") End Sub
/AdminTools/App/Name[text()='Test1']
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)