I use XSLT to get data from the feed. I am currently using this block of code , which simply selects the first item from the feed. I changed it a bit, so it applies to this XML sample.
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="/"> <xsl:value-of select="catalog/book/author"/> </xsl:template> </xsl:stylesheet>
I want to sort xml by price, and then select the author associated with the best-selling book. I have tried all kinds of things, but I cannot figure it out.
The current output is Gambardella, Matthew, but I need it to be Galos, Mike.
source share