473,378 Members | 1,500 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

xml - write to browser

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

Apr 2 '07 #1
3 1242
On Apr 2, 2:02 pm, "RedLars" <Liverpool1...@gmail.comwrote:
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?

Apr 2 '07 #2
RedLars wrote:
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));


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Apr 2 '07 #3
On 2 Apr, 14:41, Martin Honnen <mahotr...@yahoo.dewrote:
RedLars wrote:
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));

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Martin; Thanks for helping out.

Apr 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: James Marshall | last post by:
I'm writing a library where I want to override document.write(), but for all document objects; thus, I want to put it in the prototype. I tried Document.prototype.write= my_doc_write ; but it...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
9
by: msuk | last post by:
All, I have a well form block of XML that is stored in a C# string type and I just simply want to display it in the browser using Response.Write but when I try this I get the following error: ...
11
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as...
6
by: john.lum | last post by:
I am using document.write in an external javascript file to display some content, but I've found that I can't rely on that content being displayed in the location I expect. Here's a very simple...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.