Hey Guys,
I thought I would give the XSL Transformation engine a go. Never used XSL before but it looks interesting. Sadly it's not showing any results so far.. after hours of head scratching, it's time to ask for help :)
My XML Source is:
<DocumentElement>
<QueryResults>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
<Email>test@test.com</Email>
<PropertyValue>01234 567890</PropertyValue>
</QueryResults>
<QueryResults>
<FirstName>Jane</FirstName>
<LastName>Doe</LastName>
<Email>janedoe@test.com</Email>
<PropertyValue>09876 543123</PropertyValue>
</QueryResults>
</DocumentElement>
My XSLT File looks like this.. I started off basic and once I get results will modfify.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="DocumentElement">
<table border="1">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
<th>PropertyValue</th>
</tr>
<xsl:for-each select="DocumentElement/QueryResults">
<tr>
<td><xsl:value-of select="FirstName"/></td>
<td><xsl:value-of select="LastName"/></td>
<td><xsl:value-of select="Email"/></td>
<td><xsl:value-of select="PropertyValue"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
When I run this I get no results. No errors either so that's good :D
Any ideas on what I am missing ?
Cheers !