Software Technology Tips

How to Create a Tablular Structure of a XML File Using XSL.
Sometimes we need to display the data that are present in a xml file in a tabular format. Following code explan how to display a tabular format of the XML file by applying XSL stylesheet.

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="showtableformat.xsl"?>
    <LastName> Nayak </LastName>
    <LastName> Dash </LastName>
   <LastName> Pandit </LastName>

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/">
        <title>Student Information</title>
  <xsl:template match = "StudentInfo">
    <table width="400" border="1" align ="center" >
      <tr bgcolor ="598744">
        <th>First Name</th>
        <th>Last Name</th>
      <xsl:for-each select="Students" >
            <xsl:value-of select="FirstName" />
            <xsl:value-of select="LastName" />

Related Tags:


Author: Surama Hotta


Let us Connect!

Awards and Achievements

Red Herringcolor DeloitteFast50 DB ZInnov1   Nascome  DB Stpi

This site uses cookies. We respect your privacy.copyright (c) Mindfire Solutions 2007-2015. Login