Read in XML file, output to screen...

C

CDZ

This seems simple enough, Read an XML file, output it to the screen.
Yes, I know that doesn't make sense but here's why I need it:

I have a sharepoint list that I'm viewing the XML from, the URL is LONG
and ugly, it comes from a .dll file. Ex:
http://domain/site/_vti_bin/owssvr.dll?Cmd=Display&List={85C78153-FD44-4384-B8B9-8D1AD96975DC}&XMLDATA=TRUE

I just want to create an asp.net / c# page that reads in the url above
and outputs raw xml using the .aspx extension.

Can you help?
Thanks
 
L

Laurent Bugnion

Hi,
This seems simple enough, Read an XML file, output it to the screen.
Yes, I know that doesn't make sense but here's why I need it:

I have a sharepoint list that I'm viewing the XML from, the URL is LONG
and ugly, it comes from a .dll file. Ex:
http://domain/site/_vti_bin/owssvr.dll?Cmd=Display&List={85C78153-FD44-4384-B8B9-8D1AD96975DC}&XMLDATA=TRUE

I just want to create an asp.net / c# page that reads in the url above
and outputs raw xml using the .aspx extension.

Can you help?
Thanks

It would be better to use a ASHX custom handler to do this. By using an
ASHX, you avoid the whole overhead due to ASP.NET processing the request
and firing all the Page related events.

See this:
http://www.galasoft-lb.ch/mydotnet/articles/article-2006100601.aspx

Of course you can do that in an ASPX Page too, but then you need to
override the Render method, you must remove the call to base.Render, and
you must close the Response when you're done rendering the XML.

HTH,
Laurent
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top