0
Reply

How to Import a XSL File inside a XML File

eliza sahoo

eliza sahoo

Jun 14 2010 7:48 AM
2.2k

This tip describes, how you can use a XSL(extensible StyleSheet file) inside a XML file to generate a HTML format of that file thus making it more user-friendly.

Let's Convert this XML File to a Html Format Using XSL StyleSheet:

<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="CDDemo.xsl"?>

<StudentInfo>

      <Student>

      <id value="11" />

      <addr use="HP">

        <streetAddressLine>HindolaRoad</streetAddressLine>

        <streetAddressLine>Dhenkanal</streetAddressLine>

        <city>BBSR</city>

        <state>OR</state>

        <postalCode>12345</postalCode>

        <country>IN/country>

      </addr>

      <name>

            <Prefix>Miss</prefix>

            <FirstName>Monalisha</FirstName>

            <LastName>Nayak</LastName>

      </name>