JavaScript
JavaScript
Load XML from Local FilePath
Demonstrates how to load XML from a local XML file.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
var success = false;
var xml = new CkXml();
// 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.");