Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple xml for website

Status
Not open for further replies.

trfrady

Technical User
Joined
Nov 25, 2004
Messages
1
Location
US
Hi guys,

I'm used to Mysql and php, but I want to try and use an xml datafeed for my site. How can I use this t-shirt xml on a webpage?

I should be able to input any data from this xml to an html page right?

I tried

<html>
<body>

<xml id="xml_affiliate" src="xml_affiliate.xml"></xml>

<table border="1" datasrc="#xml_affiliate">

<tr>
<td><span datafld="comics"></span></td>
<td><span datafld="comics"></span></td>
</tr>

</table>

</body>
</html>
with no success on this page all I get is an empty table.

If someone could give me real simple step by step instructions to make a simple page with that xml feed, I think I could figure it out from there.
 
You need to use XSLT to transform the XML into HTML. I would recommend htt to learn about it.

I have taken a small chunk of your XML file and transformed it using XSLT:


To use this download this file to your site:


Then add the following to your XML file:

Code:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="htmlview.xsl"?>
<tshirtking_catalog>
	<product>

Hope this helps.

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top