xml - write to browser

  • Thread starter Thread starter RedLars
  • Start date Start date
R

RedLars

Quick question,

For debugging purposes I'd like to ouput the entire xml file to my
default browser. Do I need to traverse the xml structure (info
xmlelement) myself or is there a standard api that does this for me?

<%@ Page Language="c#"%>
<%
Server obj = new Server("localhost");
System.Xml.XmlElement info = obj.GetInfo();
// write to browser
%>

Using WinXP sp2 - IIS 5.1 - .NET 1.1
 
Quick question,

For debugging purposes I'd like to ouput the entire xml file to my
default browser. Do I need to traverse the xml structure (info
xmlelement) myself or is there a standard api that does this for me?

<%@ Page Language="c#"%>
<%
Server obj = new Server("localhost");
System.Xml.XmlElement info = obj.GetInfo();
// write to browser
%>

Using WinXP sp2 - IIS 5.1 - .NET 1.1

InnerXml?
 
RedLars said:
For debugging purposes I'd like to ouput the entire xml file to my
default browser. Do I need to traverse the xml structure (info
xmlelement) myself or is there a standard api that does this for me?

<%@ Page Language="c#"%>
<%
Server obj = new Server("localhost");
System.Xml.XmlElement info = obj.GetInfo();
// write to browser

Response.ContentType = "application/xml";
info.WriteTo(new XmlTextWriter(Response.Output));
 
Back
Top