Outputing Xml from ASPX

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I want to write an .ASPX page that does nothing but returns a proper XML
document to the client (IE or whatever). If I have a fully composed
"XmlDocument" object in my .ASPX file's Page_Load() and I want to output the
Xml in that object and have to xml document returned have the proper header
info, etc. so that it will be received as XML, how do I do this. I'm sure
it's incredibly simple but I haven't worked it out.

Thanks
 
Alex Maghen said:
Hi. I want to write an .ASPX page that does nothing but returns a proper XML
document to the client (IE or whatever). If I have a fully composed
"XmlDocument" object in my .ASPX file's Page_Load() and I want to output the
Xml in that object and have to xml document returned have the proper header
info, etc. so that it will be received as XML, how do I do this. I'm sure
it's incredibly simple but I haven't worked it out.

Thanks
 
Hi Alex,
If you are trying to ouptput the XML as it is in your browser, then try to
use the following line of code in your .ASPX page...

<META http-equiv="Content-Type" content="text/xml">

Good luck,
K.V.Ravindra Kumar
 
Back
Top