UTF-8 is the default encoding format for XML, so it doesn't need to be there. Guessing it gets stripped as it is the default. You should only need to provide an encoding if you use something **other than UTF8** (like 1252 that FoxPro does when not specified).
+++ Rick ---
>Hi there,
>
>I want to create a xml-file using msxml2.domdocument encodesd in UTF-8
>Almost everything is fine but two things do not work as expected.
>
>I start with:
>
>oxml = createobject("msxml2.domdocument")
>opi= oXML.createProcessingInstruction('xml','version="1.0" encoding="UTF-8"')
>* or, as found in a Doug Hennig post
>opi= x.createProcessingInstruction('xml','version="1.0"' + ' encoding="UTF-8"')
>oXML.appendChild( oPI )
>
>But it makes no difference what I use, the encoding doesn't show up in the processing instruction.
>What am I doing wrong here?
>
>I assume the second problem is a follow up. When I try to save the file,
>I get an error telling me, that some chars cannot be saved in ISO-8859-Mode"
>By now I helped myself by saving the file with strtofile(oXML.xml, cOutput)
>but I would prefer the save-method to work
>
>Best regards
>
>Thomas