webofunni Posted June 10, 2006 Share Posted June 10, 2006 hello friends , I want to know how i can view the out put of an xml file . in any browser i can only view the sourse file with + n - grouping i want to see the xml out put as html out put is it is possible n if i need any software for that please tell me Link to comment Share on other sites More sharing options...
boen_robot Posted June 10, 2006 Share Posted June 10, 2006 XML is suppose to carry data, unlike (X)HTML which describes the structure of the page you know. An XML page is not the same as XHTML page. The simplest way is to save your file with the extension *.html or *.xhtml and that's it.If you really need to inlude your XML in another XML to XHTML transformation, you could create an XSLT stylesheet with a content of: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><xsl:copy-of select="."/></xsl:template></xsl:stylesheet> If you save this file as copy.xsl, then include this in your XML just below the XML prolog (before the root element): <?xml-stylesheet type="text/xsl" href="copy.xsl"?> And you're ready. Simply preview the XML. You'll see the results of what is happeing with your XML if it was (X)HTML. If you look at the source, it would still be the XML source though. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now