I have a codeunit published as a web service and one of the functions takes a bigtext as a parameter. The parameter contains an XML fragmwent. When i try to load this text into the MsXML Dom i get an error about a illegal character.
When i add an xml-declaration with encoding ‘ISO-8859-1’ the text is loaded, but the special characters that occur are mixed up (Expected because the input string is actually unicode). When i change the encoding to “UTF-16” it fails to load also.
here is the code in the codeunit:
Any suggestions how to specify the correct encoding?