XSLT getting last element

前端 未结 1 1733
情书的邮戳
情书的邮戳 2020-11-29 23:46

I am trying to find the last element in my xml, which looks like:

    
        
        

        
相关标签:
1条回答
  • 2020-11-29 23:57

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

    (//element[@name='D'])[last()]
    
    0 讨论(0)
提交回复
热议问题