|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the following example feed that I am trying to display on a standard web page.
I have read lots about XML but I am finding it hard to get a grip on exactly what is needed. Any pointers as to the html file needed to bring this information into the web page is greatly appreciated. Also I have hosted web space so the server is limited to what I can place on it. Here is the feed. Thankyou for your time any any advide you can give me. Quote:
|
|
#2
|
|||
|
|||
|
Any ideas anyone at all please
![]() |
|
#3
|
|||
|
|||
|
What are your aims? Do you want to use the XML data for the HTML file? In that case, perhaps you should try to find XML Data Island or Transformnode in some search engine to find some more clues. Or why don't you search it in this forum?
Did it help you? Last edited by wendra : May 10th, 2004 at 02:10 AM. |
|
#4
|
||||
|
||||
|
I just made a simple XSL to go with your XML:
Code:
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"
doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
<xsl:template match="soccer"><!--root-->
<html>
<head>
<style type="text/css">
<xsl:comment>
body {font-family:verdana;font-size:10px;}
.ken {background-color:#ebebeb;}
.header {background-color:#cbcbcb;}
</xsl:comment>
</style>
</head>
<body>
<xsl:for-each select="cp">
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td colspan="2" class="header" align="center">
<xsl:value-of select="@nm" />
</td>
</tr>
<xsl:for-each select="gm">
<tr>
<td width="150">
<xsl:value-of select="@c1" />
</td>
<td width="150" class="ken">
<xsl:value-of select="@c2" />
</td>
</tr>
</xsl:for-each>
</table>
<br />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I gave it a filename of soccer.xsl Then in your XML doc you add this to the top: Code:
<?xml version="1.0" standalone="yes"?> <?xml-stylesheet href="soccer.xsl" type="text/xsl"?> I did more work on it, so if you want a fancier XSL you can PM me.
__________________
Hello, old friend... Last edited by khwang : May 7th, 2004 at 02:32 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Please Be Gentle With Me :) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|