Use of XSLT with XML

In this article I am going to explain about XML with XSLT.
  • 1944


XSLT stands for eXtensible Stylesheet Language Transformations. XSLT is the recommends style sheets language of XML. It is more sufficient than CSS. The root element that declares the document to be an XSL style sheet is <xsl:stylesheet> or <xsl:transform>.  For access XSLT element, attribute, and its feature we must be declared XSLT namespace top of the document. XMLT may be use for transforming XML Document in HTML Document. Its should be done before display on Browser.

Create XSLT style sheet

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"

<xsl:template match="/">
  <h2>My Document</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
    <xsl:for-each select="catalog/cd">
      <td><xsl:value-of select="Name"/></td>
      <td><xsl:value-of select="Address"/></td>


Link XSLT style sheet with XML document

 <?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
    <Address>New Delhi</Address>
    <company>M.C.N Solutions</company>

Further Readings

You may also want to read these related articles

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.