Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Find XML Records VB.NET sample code showing how to find / search for XML records in an XML document. ' Find all companies located in California
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim xml As New Chilkat.Xml()
xml.LoadXmlFile("companies.xml")
' Navigate to the first company record.
xml.FirstChild2()
' Find the next XML node where there is a child node having tag "name"
' with a value that matches the wildcarded pattern "Microsoft*"
ListBox1.Items.Clear()
ListBox1.Items.Add("Companies in California")
While Not (xml Is Nothing)
' FindNextRecord *will* return the current record if it
' matches the criteria.
xml = xml.FindNextRecord("state", "CA")
If Not (xml Is Nothing) Then
' Add the company name to the listbox.
ListBox1.Items.Add(xml.GetChildContent("name"))
' Advance past this record.
xml = xml.NextSibling()
End If
End While
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.