I am writing a simple HTML file. I would like to embed XML in it. I do this using iFrames. In IE9, XML is formatted (although it does display ActiveX warnings). If I run the same code in IE10, I DO NOT see formatting at all. I only see XML content. However, if I open the XML separately, I can see the formatting.
How to get formatting in IE10 inside iframe? Thanks in advance.
Here is my HTML code
<html> <head> <title>Test Code</title> </head> <body> <iframe src="sample.xml"></iframe> </body> </html>
And my sample.xml
<?xml version="1.0" encoding="utf-8" ?> <test>asd</test>
- Update. The mode of switching the browser to IE8 mode works.
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Is this the only solution or is there a better solution for IE10 based on this?
source share