Hi Samuel
Much appreciate your input!!!

--- Your suggestion ----
Replacing
Send AddAttributeNS of hoInsertedMode "" "encoding" "utf-8"
with
Send AddAttribute of hoInsertedMode "encoding "utf-8"
again produced an error.
This time it said invalid message "Set_AttributeValue"

---- DF20 ----
Good to know it works in DF20.

---- DF19.1 ----
I also tried
Get CreateChildProcessingInstruction of hoRoot "xml" 'version="1.0" encoding="utf-8" standalone="yes"' to hoNodeToInsert
and I got
<?xml version="1.0" standalone="yes"?>

---- Conclusions -----
.1. In DF19.1, using
CreateChildProcessingInstruction, the portion of the string that is [encoding="utf-8"] is dropped.
.2. AddAttribute does not work with an node created with CreateChildProcessingInstruction

---- Workaround for DF19.1 ----
Forget using CreateChildProcessingInstruction.
Instead use:
Move ('<?xml version="1.0" encoding="utf-8"?>' + sXml) to sXml

Archie