Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
Navigate to Content in XMLDemonstrates how to retrieve "Bears" from the following XML:
<?xml version="1.0" encoding="utf-8" ?>
<sports>
<baseball>
<mlb>
<chicago>Cubs</chicago>
<new_york>Yankees</new_york>
</mlb>
</baseball>
<football>
<chicago>Bears</chicago>
<new_york>Jets</new_york>
</football>
<basketball>
<chicago>Bulls</chicago>
<new_york>Knicks</new_york>
</basketball>
</sports>
Downloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries FreeBSD C++ Libraries HP-UX C++ Libraries BlackBerry QNX C++ Libraries #include <CkXml.h> void ChilkatSample(void) { CkXml xml; // Assume the XML is contained in the file: sports.xml bool success; success = xml.LoadXmlFile("sports.xml"); if (success != true) { printf("%s\n",xml.lastErrorText()); return; } CkXml *xml2 = 0; CkXml *xml3 = 0; xml2 = xml.GetChildWithTag("football"); xml3 = xml2->GetChildWithTag("chicago"); printf("%s\n",xml3->content()); delete xml2; delete xml3; } |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.