Processing UTF-16 encoded xml file
Posted on 2004-03-30
I am using msxml 4 to load a xml file into DOM tree. The problem is, the XML file is not well formed as it:
- does not specify the encoding
- does not have a byte-order mark at the beginning of the document
- contains UTF-16 encoded data
As a result, I got a "invalid character found" error when building the DOM tree. As I have no control on the XML generation side to correct this problem, I ened a workaround. One way I can think of is to dynamically insert the encoding into the xml file, but I am looking for a better way. Is there any option in msxml to specify a "default encoding" in case no encoding is specified? I am looking for something like that:
Any helps is appreciated.