XML EncodingsMSXML supports all encodings that are supported by Microsoft Internet Explorer. Internet Explorer's support depends on which language packs are installed on the computer; this information is stored under the following registry key:
<?xml version="1.0" encoding="ISO-8859-1"?>
MSXML DOM ErrorsTwo common errors that are returned from the XML Document Object Model (DOM) interface methods are:
- No encoding is specified, no byte-order mark is found at the beginning of the XML file, and the data contains special characters
- The specified encoding does not match the actual encoding of the XML data.
With the MSXML parser versions 2.5, 2.5 SP1 and 2.6, the loadXML method of IXMLDOMDocument can only load UTF-16 or UCS-2 encoded data. Any attempt to load XML data that is encoded with another encoding format results in the following error:
hr = pXMLDoc->loadXML("<?xml version=\"1.0\" encoding=\"UTF-8\"?><tag1>Abcdef</tag1>");
You may also receive these errors when you call the transformNode method of the IXMLDOMNode interface with a XSL or XSLT file in which the XML encoding information is specified as follows:
<xsl:output method="xml" encoding="UTF-8" />
transformNodeToObject method and store the results to a stream or to a new XML document and then save it.
Article ID: 275883 - Last Review: Jun 22, 2014 - Revision: 1