Sample code for 30+ languages & platforms
Delphi DLL

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Delphi DLL Downloads

Delphi DLL
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Xml;

...

procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
xml: HCkXml;

begin
success := False;

xml := CkXml_Create();

// Pass either an absolute file path, or a file path relative from the current working directory of the caller.
success := CkXml_LoadXmlFile(xml,'qa_data/hamlet.xml');
if (success = False) then
  begin
    Memo1.Lines.Add(CkXml__lastErrorText(xml));
    Exit;
  end;

Memo1.Lines.Add('Success.');

CkXml_Dispose(xml);

end;