Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
SearchForAttribute - Search XML Document for AttributeDemonstrates how to use Chilkat XML's SearchForAttribute method. ' XML Example: Load this document and access the count for Total:
' <?xml version="1.0" encoding="utf-8" ?>
' <TSBsCountResponse>
' <ErrorCode>0</ErrorCode>
' <ErrorMessage>No Error</ErrorMessage>
' <TSBType name="Campaign or Recall" count="2"/>
' <TSBType name="DTC Related" count="6"/>
' <TSBType name="Service Bulletin" count="16"/>
' <TSBType name="Others" count="110"/>
' <TSBType name="Total" count="132"/>
' </TSBsCountResponse>
Dim xml As New ChilkatXml
xml.LoadXmlFile "sample.xml"
Dim xTotal As ChilkatXml
Set xTotal = xml.SearchForAttribute(Nothing, "TSBType", "name", "Total")
MsgBox "Total = " + xTotal.GetAttrValue("count")
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.