tags:

views:

30

answers:

2

xml:

<skills>
  <skill>PHP</skill>
  <skill>CSS</skill>
  <skill>HTML</skill>
  <skill>XML</skill>
</skills>

XSL:

<ul>
  <xsl:for-each select="skills/skill">
    <li><xsl:value-of select="[what should be xpath here]" /></li
  </xsl:for-each>
</ul>

Here what should be the xpath to print each skill?

+1  A: 

You can get the values of skill tags as follows:

<xsl:for-each select="skills/skill">
<li><xsl:value-of select="." /></li>
</xsl:for-each>
Abdel Olakara
Thanks buddy, I want to vote you but no reputation :)
Shoaib
to begin with you can accept the answer as correct and gain some reputation.
Abdel Olakara
+1  A: 

Use: .

The . abbreviation is equivalent to self::node() and means: the current node.

<xsl:value-of select="someNode"/>

outputs the string value of the node, which in your case is the value of only text node of the skills/skill node that is currently selected by the <xsl:for-each> instruction.

Dimitre Novatchev