Jump to content
Sign in to follow this  

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 



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...