Find the maximum child count with XPath 1.0

前端 未结 3 1184
谎友^
谎友^ 2021-01-23 06:27

Can I find one XML node with the most children with XPath?


  
    
  
  
    <         


        
3条回答
  •  不思量自难忘°
    2021-01-23 07:00

    I think that it is impossible because to count children you need function count() which has one parameter - node-set and returns count of elements in this set. So you have no option how to count more node-sets than one to get max value.

    Note: I am talking about XPath 1.0

提交回复
热议问题