Sample code for 30+ languages & platforms
Unicode C

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Unicode C Downloads

Unicode C
#include <C_CkXmlW.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkXmlW xml;

    success = FALSE;

    xml = CkXmlW_Create();

    //  Pass either an absolute file path, or a file path relative from the current working directory of the caller.
    success = CkXmlW_LoadXmlFile(xml,L"qa_data/hamlet.xml");
    if (success == FALSE) {
        wprintf(L"%s\n",CkXmlW_lastErrorText(xml));
        CkXmlW_Dispose(xml);
        return;
    }

    wprintf(L"Success.\n");


    CkXmlW_Dispose(xml);

    }