xml - write to browser

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
 
G

Guest

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?
 
M

Martin Honnen

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));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top