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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Data newbee

Status
Not open for further replies.

AJCG

Programmer
Jan 9, 2002
31
GB
Hi,

I have just been given some xml and I need to create a HTML page which access the data. This is where I have hit a big old snag. First off tho please note I have never touched XML data before so I know very little.

The XML data I have does not seem to have an xsl stylesheet and I think this is where I am hiting my first brick wall. Can anyone point me in the right direction for using what I guess is completely raw xml data and getting a good output?

Regards

Adam
 
Hi Update for you...

I have now created a new xsl file (not quite working yet..)

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl=" match="/">
<html>
<body>
<h2>CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
<th>Track</th>
<th>FileName</th>
</tr>
<xsl:for-each select="Product/Tracks/Track/DigitalFiles/AudioFile/FileInfo/FileName">
<tr>
<td><xsl:value-of select="Product/ProductTitle"/></td>
<td><xsl:value-of select="Product/Artists/Artist/FullName"/></td>
<td><xsl:value-of select="Product/Tracks/Track/TrackTitle"/></td>
<td><xsl:value-of select="Product/Tracks/Track/DigitalFiles/AudioFile/FileInfo/FileName"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>

Now the problem seems to be showing the data I need, its at least one to many on all Audiofiles (Two filenames per track). The output I am getting is nowhere near enough and I would love to sort this.

Adam
 
Whats your XML and what output would you like?

Jon

"I don't regret this, but I both rue and lament it.
 
Output I would like into an Oracle DB - Normal table (This is an external data feed btw)

 
By output, I mean output from the stylesheet, ie HTML. And what's the XML input (example)?

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top