Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Delete Nodes from XML VB.NET sample code showing how to delete nodes from an XML document. ' Remove the Microsoft record from the XML file.
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim xml As New Chilkat.Xml()
Xml.LoadXmlFile("companies.xml")
xml.FirstChild2()
Dim microsoft As Chilkat.Xml
microsoft = xml.FindNextRecord("name", "Microsoft*")
' The Microsoft record is now root itself.
Microsoft.RemoveFromTree()
' Save the XML with the Microsoft record removed.
Xml.GetRoot2()
Xml.SaveXml("msRemoved.xml")
' Save the Microsoft record by itself.
Microsoft.SaveXml("microsoft.xml")
End Sub
Important: The download for this
example does not contain the ChilkatDotNet.dll which |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.