Converting an XML document to HTML using XSLTTo convert an XML document into HTML you need XML style sheet file which has all the formatting information in it. This file is the XSL file. By using this file the contents of the XML file are displayed in HTML as required by the user. You need to create an XSL file for the XML file you want to convert. For this purpose it would be better if you use some XML editing tools like XMLSpy. These tools make your job of writing the XSL file easier. Many views are available which might help you to create the XSL file you want. Once you have created the XSL file, the job is to use it to convert the XML file. The simple way to do this is to include the XSL file in the XML file itself using the tag, <?xml-stylesheet type="text/xsl" href="ur_xsl_file.xsl"?> After including this tag in the XML file, try opening the XML file in the latest browsers like Internet Explorer or Firefox. You would see the contents of the XML file displayed in the way you need, according to the XSL file. Classes and methods are available in languages to this task of converting using programming. In PHP and JavaScript you can use the DOM objects and methods to do the conversion.
|
|
||
|
|||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.