NativeXml Help
Example 1
In order to get this header: <?xml version="1.0" encoding="UTF-16"?> enter this code:

MyXmlDocument.Charset := 'UTF-16';
When reading a file, Charset will contain the encoding used.