Eric Wild
2004-10-06 02:32:54 UTC
Hey all,
I've been messing aroud with this and can't seen to get it right. I just
want to make the XML file display as it would if I had double clicked on the
file. I've used:
Response.Clear()
Response.ContentType = "text/XML"
'Response.ContentType = "text/plain"
'Response.ContentEncoding = System.Text.Encoding.UTF8
Response.WriteFile(fileName)
Some of the lines are commented, but I've tried various combinations.
When I just call:
Response.WriteFile(fileName)
I get in the browser:
Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/Test/Test/fileXML.aspx'. Line 16, Position 11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
----------^
The error happens periodically, and on different XML at different lines in
the XML document.
Any Help?
Eric Wild
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 8 November 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
Guerrilla ASP.NET, 13 December 2004, in Boston
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com
I've been messing aroud with this and can't seen to get it right. I just
want to make the XML file display as it would if I had double clicked on the
file. I've used:
Response.Clear()
Response.ContentType = "text/XML"
'Response.ContentType = "text/plain"
'Response.ContentEncoding = System.Text.Encoding.UTF8
Response.WriteFile(fileName)
Some of the lines are commented, but I've tried various combinations.
When I just call:
Response.WriteFile(fileName)
I get in the browser:
Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/Test/Test/fileXML.aspx'. Line 16, Position 11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
----------^
The error happens periodically, and on different XML at different lines in
the XML document.
Any Help?
Eric Wild
===================================
This list is hosted by DevelopMentor® http://www.develop.com
NEW! ASP.NET courses you may be interested in:
Guerrilla ASP.NET, 8 November 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
Guerrilla ASP.NET, 13 December 2004, in Boston
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com