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
|
(Visual FoxPro) XML Parsing Example: Currency DataSimple example showing how to parse an XML file containing currency data. LOCAL loXml LOCAL lnSuccess LOCAL loCurr LOCAL n LOCAL i loXml = CreateObject('Chilkat.Xml') * The Chilkat XML component is freeware. * Load an XML document. * This file is available at http://www.chilkatsoft.com/testData/currency.xml lnSuccess = loXml.LoadXmlFile("c:/myXmlFiles/currency.xml") IF (lnSuccess <> 1) THEN ? loXml.LastErrorText QUIT ENDIF * Iterate over each "CURRENCY" child node and display the contents: n = loXml.NumChildrenHavingTag("CURRENCY") FOR i = 0 TO n - 1 loCurr = loXml.GetNthChildWithTag("CURRENCY",i) ? "----" ? "Name: " + loCurr.GetChildContent("NAME") ? "Code: " + loCurr.GetChildContent("CURRENCYCODE") ? "Country: " + loCurr.GetChildContent("COUNTRY") RELEASE loCurr NEXT RELEASE loXml |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser