I wish to have as the first line of the XML I am generating
<?xml version="1.0" encoding="utf-8"?>
The code that I am using (below) is generating
<?xml version="1.0"?>
My question: Why is the encoding="utf-8" missing from what I generate?
Code:
Get Create (RefClass(cXMLDOMDocument)) to hoXML
Get CreateDocumentElementNS of hoXML "" "DocumentMetaData" to hoRoot
// Lots of fun code
Get CreateChildProcessingInstruction of hoRoot "xml" 'version="1.0" encoding="utf-8"' to hoNodeToInsert
If (hoNodeToInsert > 0) Begin
Get InsertBeforeNode of hoXML hoNodeToInsert hoRoot to hoInsertedNode
If ((hoInsertedNode > 0) and (hoNodeToInsert <> hoInsertedNode)) Begin
Send Destroy of hoInsertedNode
End
If (hoNodeToInsert) Send Destroy of hoNodeToInsert
End
Thanks
Archie