XML files may open in Internet Explorer instead of opening in the expected Office program when the ContentType header contains the charset parameter

Article translations Article translations
Article ID: 888579 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

If the ContentType header in your XML file contains the charset parameter, the XML file may open in Microsoft Internet Explorer instead of opening in the expected Microsoft Office program.

CAUSE

This problem occurs if the ContentType header in the XML file includes the charset parameter.

RESOLUTION

To resolve this problem, remove the charset parameter from your XML file.

MORE INFORMATION

The following code does not open the XML file in Microsoft Office Word 2003:
<%Response.ContentType = "text/xml; charset=utf-8"%>
<?xml version="1.0" encoding="UTF-8" ?> 
<?mso-application progid="Word.Document"?> 
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
  <w:body>
	<w:p>
	  <w:r>
		<w:t>My test document.</w:t>
	  </w:r>
	</w:p>
  </w:body>
</w:wordDocument>
The following code does open the XML file in Word 2003:
<%Response.ContentType = "text/xml%>
<?xml version="1.0" encoding="UTF-8" ?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
  <w:body>
	<w:p>
	  <w:r>
		<w:t>My test document.</w:t>
	  </w:r>
	</w:p>
  </w:body>
</w:wordDocument>

Properties

Article ID: 888579 - Last Review: September 22, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft Office InfoPath 2007
  • Microsoft Office Excel 2007
  • Microsoft Office Word 2007
  • Microsoft Office InfoPath 2003
Keywords: 
kbopenfile kbxml kbtshoot kbprb KB888579

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com