开发者

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>
    <开发者_如何学Python;content>item 2</content>
    <content>item 3</content>
    <content>item 4</content>
    <content>item 5</content>
    <content>item 6</content>
</root>


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜