This doesn't work for me in Delphi XE2.
Var
XMLDoc : IXMLDOCUMENT;
begin
XMLDoc := NewXMLDocument;
XMLDoc.Active := True;
XMLDoc.Version := '1.0';
XMLDoc.Encoding := 'utf-8';
XMLDoc.Options := [doNodeAutoIndent];
Memo1.Text := XMLDoc.XML.Text;
I still do NOT get the encoding="utf-8"?>
in the resulting doc. But if I say
XMLDoc.Encoding := 'utf-16';
then it I do get encoding="utf-16"?>
in the resulting doc.
Any ideas? Anyone?
After generate Xml File Make Format and save it will save as UTF8