tags:

views:

39

answers:

2

Hi there,

I am trying to get firefox to render the xml that is being returned to it in a tree like format as in Internet explorer..

Currently it just displays the field values .. i.e. NO XML

Is there some special setting i am missing?

EDIT

Here is the xml that is being returned

<ArrayOfSampleItem xmlns="http://schemas.datacontract.org/2004/07/InmoCasaService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;SampleItem&gt;&lt;Id&gt;1&lt;/Id&gt;&lt;StringValue&gt;Hello&lt;/StringValue&gt;&lt;/SampleItem&gt;&lt;/ArrayOfSampleItem&gt;

but it displays the following

1Hello

EDIT

And here is what is returned via fiddler

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 222
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 16 Aug 2010 19:56:27 GMT

<ArrayOfSampleItem xmlns="http://schemas.datacontract.org/2004/07/InmoCasaService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;SampleItem&gt;&lt;Id&gt;1&lt;/Id&gt;&lt;StringValue&gt;Hello&lt;/StringValue&gt;&lt;/SampleItem&gt;&lt;/ArrayOfSampleItem&gt;

EDIT

Now i have this... but still the same problem.. Look at the content type

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 226
Content-Type: application/xml
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 17 Aug 2010 06:09:14 GMT

<ArrayOfSampleItem xmlns="http://schemas.datacontract.org/2004/07/InmoCasaService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;SampleItem&gt;&lt;Id&gt;1&lt;/Id&gt;&lt;StringValue&gt;He4444llo&lt;/StringValue&gt;&lt;/SampleItem&gt;&lt;/ArrayOfSampleItem&gt;
A: 

It's because Firefox is trying to render the file as HTML, as it is being told by the Content-Type: text/html header. And HTML browser should ignore unknown tags.

You want your server to return Content-Type: application/xml. I don't know how to configure IIS to do this, but the easiest way may be to name the file with the .xml extension, if you haven't already.

svick
Thanks for the comment... Well i have managed to change the content-type but everything is still the same... I will update my question with the fiddler headers etc
mark smith
A: 

Also it may not render in FF because you dont have xml full structure including header (not the http header, they seems fine) and encoding informations.

Benoit
THanks, In Internet Explorer there is no issue.. What am i missing exactly then? My xml that is being returned is above in my question and it has a xmlns and is valid xml.
mark smith