<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v4.2 -->
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Save it as an XML file.
Drag it into IE.
You'll notice how it's all nice and formatted.
Now, change the extension of the .xml file to, say, .jdfx
Drag it into IE.
It shows up as text.
How can I get it to show up like an XML file would?
Notes:
This shows up fine in FF.
This SEEMS to be a limitation of IE.
Believe it or not, IE has got it right. If you drag and drop a file into Internet Explorer you are viewing it on the local system and hence IE is entirely reliant on the operating system to work out the context of the file. Internet Explorer simply looks to see whether or not the file is text or binary, if it is text it displays it as plain text and if it is a binary file it displays the familiar save dialog.
This is a the right thing to do because there is no garuntee that a text file with the <?xml ?> delcaration, is an XML file.
Firefox, makes an educated guess that the file is XML based on the declaration and parses it as such.
The story is different however when you download the file over HTTP. The browser should and must in fact then read the MIME type sent by the HTTP server and deal with file appropriatly, regardless of its extension. xml for example should be application/xml.
Are the build numbers for IE the same. My compuer used to display them as text but now it formats it as xml and even applies a stylesheet if there is one.
Your work collegues haven't got "Hide Known File Extensions" enabled in their Folder options do they?