I'm working with Delphi 7 and OmniXML and am trying to create a document and I need to have the DocumentElement be:
<?xml version="1.0" encoding="UTF-8"?>
But I can't understand how to add the last ?
sign.
My code:
var
xml: IXMLDocument;
begin
xml := ConstructXMLDocument('?xml');
SetNodeAttr(xml.DocumentElement, 'version', '1.0');
SetNodeAttr(xml.DocumentElement, 'encoding', 'UTF-8');
XMLSaveToFile(xml, 'C:\Test1.xml', ofIndent);
end;