We help IT Professionals succeed at work.

ViewXML in IE via  ASP

sidwelle
sidwelle asked
on
318 Views
Last Modified: 2012-05-11
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>
  <tag1>TagData1</tag1>
  <tag2>TagData2</tag2>
</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:
TagData1TagData2

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


Comment
Watch Question

CERTIFIED EXPERT
Expert of the Year 2008
Top Expert 2008
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
That worked!

What was the browser defaulting to if not "text" ?
CERTIFIED EXPERT
Expert of the Year 2008
Top Expert 2008

Commented:
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.

Author

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.

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.