tags:

views:

32

answers:

1

I have an xml file saved and this is what I want to do,

when some one click the link that contains an xml file, I want them to ask the question if they want to save or open the file.

I know there is a way to do this using http header to send and trick your brower into using the application/octet-stream mime type, but I forgot how it was done. .. it gives me this error

The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource 'file:///C:/Documents and 

Thanks

+3  A: 

Try adding Content-Disposition header:

Content-Disposition: attachment; filename="yourfile.xml"

And of course, the XML Content-Type header also:

Content-type: text/xml
Pablo Santa Cruz
yea but it gives me this error The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. --------------------------------------------------------------------------------XML document must have a top level element. Error processing resource 'file:///C:/Documents and
Sounds like an issue with your XML.
Pablo Santa Cruz
no tried with other ones...same thing happened. even the simples xml did the same thing
Post your XML with the answer.
Pablo Santa Cruz