Sample code for 30+ languages & platforms
Delphi DLL

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

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;
strDecoded: PWideChar;

begin
success := False;

// Load an XML file containing the following:

// <?xml version="1.0" encoding="UTF-8"?>
// <output>Franz&#xf6;sische</output> 

xml := CkXml_Create();
success := CkXml_LoadXmlFile(xml,'qa_data/xml/hasHtmlEntity.xml');

// Get non-decoded content, then get decoded content.

// Result is Franz&#xf6;sische
Memo1.Lines.Add(CkXml__content(xml));

// Result is Französische
strDecoded := CkXml__decodeEntities(xml,CkXml__content(xml));
Memo1.Lines.Add(strDecoded);

CkXml_Dispose(xml);

end;