且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

XSLT获得最后一个元素

更新时间:2023-11-07 13:08:28

您需要将last()索引放在节点列表结果上,而不是作为选择标准的一部分.试试

You need to put the last() indexing on the nodelist result, rather than as part of the selection criteria. Try

(//element[@name='D'])[last()]