cc96ai
cc96ai

Reputation: 751

XSLT display item

In the following XML, I would like only get the number 2 and 5 items, how could it be done on XSLT?

<root>
    <content>item 1</content>
    <content>item 2</content>
    <content>item 3</content>
    <content>item 4</content>
    <content>item 5</content>
    <content>item 6</content>
</root>

Upvotes: 0

Views: 84

Answers (1)

Abe Miessler
Abe Miessler

Reputation: 85046

Try this:

<xsl:value-of select="/root/content[2]" /> 
<xsl:value-of select="/root/content[5]" /> 

NOTE:

Oded is right but I think this is the best you can get

Upvotes: 1

Related Questions