I have this XML file:
<produce>
<item>apple</item>
<item>banana</item>
<item>pepper</item>
<item>apples</item>
<item>pizza</item>
</produce>
and I want extract only items' name , for example apple,banana,pepper,apples and pizza, for this reason I create this XSL file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<ul>
<li><xsl:value-of select="text()"/></li>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
but I don't understand why it doesn't work.
Maybe I don't understand how works text()
function.
Can you help me?