Disaplying Xml

  • Thread starter Thread starter stotty
  • Start date Start date
S

stotty

Hey,

I have a string which contains an xml document in my asp.net
application. All I want to do is display this string/document in my
browser, however I want it to look nice and formatted. Essentially I
want the colour coding and the +/- to be there when I output this xml
document to my browser (like I would get if i opened an xml file with
IE).

Any ideas on how to do this...Seems like it should be simple but I'm
stuck...

Thanks!
 
You can write a stylesheet (XSLT) that will format the data correctly, then
use the System.Web.UI.WebControls.Xml control to render the content using
the stylesheet.

If you want to embed the content within other account, then you will not be
able to support IEs capability directly. If however you want to output this
content to some type of frame, then you could probably output the content
using the correct mime type (probably something like text/xml).
 
Back
Top