Let's take an example to take a sample XML file and transform it into a well formatted HTML document.
See this example:
Create an XML file named employee.xml, having the following code:
Define an XSLT stylesheet document for the above XML document. You should follow the criteria give below:
Step1: Create XSLT document
Create the XSLT document which satisfies the above requirements. Name it as employee.xsl and save it in the same location of employee.xml.
Step2: List the XSLT document to the XML document
Update employee.xml document with the following xml-stylesheet tag. Set href value to employee.xsl
Step3: View the XML document in Internet Explorer
The output will look like this: