开发者

How to get Last xx item from XML file with Xpath() query in C#?

How can I get last added 5 item's node from my XML file with Xpath ?

This is not what I want, it gives first 开发者_开发知识库5 item, I want to get last 5 item:

XPath="/newsSection/news[position()<=5]


At a guess:

XPath="/newsSection/news[position()>last()-5]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜