ViewXML in IE via ASP

I have an XML file that is retrieved via ASP.  If I view the file directly by opening the file with IE, the file looks as you would expect:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <update>

But, If the file is retrieved and displayed from an ASP page, all tags are hidden and all the text data is displayed as single long line:

Its like IE is displaying the file based on what type of file was retrieved from, not what it retrieved ?

Who is Participating?
Before you begin sending the content, set the contentType to xml:

Open in new window

sidwelleAuthor Commented:
That worked!

What was the browser defaulting to if not "text" ?
web servers typically have a "lookup" table that maps file extensions to mime types. Ex - hello.html or hello.htm will cause the server to send "text/html".  Typically, if an extension is NOT located in that "lookup table", it will use the "default" mime type configured on that server. Typically, this default mime type can be configured/changed to whatever you want. So the correct answer to

>>'What was the browser defaulting to if not "text" ?'
is whatever is configured on your server.  Typically, it would be either text/html OR text/plain.

>>'Based on "all tags are hidden and all the text data is displayed as single long line:'
My guess is it is configured to text/html.
sidwelleAuthor Commented:
That setting must be internal to the version of IIS that I have (5.1). The mime list that is configurable is empty.

Thanks for the help.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.