Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
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")
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.