I have an XML document (in a .net C# web app) that I want to display in its simplistic form (similar to IE). I need it to be browser independent (or as much as possible) and have a consistent display.
I have tried pushing the xml document through as “text/xml” and this is inconsistent and doens’t work in some browsers.
http://sources.redhat.com/ml/xsl-list/2002-02/msg00831.html
A link here provided a good way of transforming the XML to HTML/XHTML using stylesheets.
However the stylesheet provided didnt work.
First: Is this the best way to do it? Are there better solutions?
Second: If not, does anyone know where I can find the XSLT?
EDIT (clarification): The XSLT I refer to will transform the XML into the Internet Explorer style display of XML files.
Thanks in advance! 🙂
I decided my best approach (for my situation) was to write 2 simple C# methods to generate HTML from the XML on the server side. This helps reduce any reliance on browser displaying XML (Opera is Crazy!)
(This example uses pretty simple formatting, which was fine for my situation.
I loosely modelled it on IE’s display of XML.
For others’ reference, here are the methods: