Sample code for 30+ languages & platforms
Node.js

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var xml = new chilkat.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) {
        console.log(xml.LastErrorText);
        return;
    }

    console.log("Success.");

}

chilkatExample();