Sample code for 30+ languages & platforms
C++

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat C++ Downloads

C++
#include <CkXml.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkXml xml;

    //  Pass either an absolute file path, or a file path relative from the current working directory of the caller.
    success = xml.LoadXmlFile("qa_data/hamlet.xml");
    if (success == false) {
        std::cout << xml.lastErrorText() << "\r\n";
        return;
    }

    std::cout << "Success." << "\r\n";
    }