An xml
file gives you structured data which is defined by the tags that you
create yourself. To display this structured data to the user with some
formatting and styles is the proper way to do. Otherwise, if you attempt
to view this data, you will see a tree like structure of your data in
the browser.
_______________________________________________
So
you have to create an xsl file that has all the formatting needed to
display that structured data in to an html file. This xsl file is included
at the top of the xml file so that when the user views the xml file.
The data
is displayed according to the formatting instructions given in the xsl
file. You can create xsl files using tools like Dreamweaver, XMLSpy
etc. There are many tools available in the market and some of them are
also freeware.
The code
given below embeds a style sheet into the xml file.
<?xml-stylesheet
type="text/xsl" href="xsl_file.xslt"?>
Upon embedding
this xsl file, the xml file is transformed into html according to the
formatting instructions given in the xsl file.