Jump to content

transform an XML file into a HTML page


Recommended Posts

Hi everyone, I try to convert an XML file to a HTML page but nothing is displayed. in the following, i put the XML code, the xslt code and the HTML page. Thank you for your help.

the XML code

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="fg.xsl" ?>

<window id='window1'>
<label id='label1'> searchPreference </label> 
<label id='label12'> seeFirst </label> 
<combobox id='CB1' name='criteriaCB'>
<item>BestRated </item>

<label id='label2'> mon </label> 
<label id='label21'> second  </label> 
<combobox id='CB2' name='DispLayout'>

<label id='label13'> Preference </label> 
<label id='label122'> see </label> 
<combobox id='CB3' name='CT'>

the XSLT code


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
<xsl:template match="/"> 
<xsl:for-each select="div">
<xsl:for-each select="label">
<xsl:value-of select="."/>
<xsl:for-each select="combobox">
<xsl:value-of select="item"/>
<xsl:for-each select="button">
<xsl:value-of select="."/>

and the HTML page 



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...