XPath to get the maximum ID

后端 未结 3 535
遥遥无期
遥遥无期 2021-01-06 20:18

XML Source:


    
        School A
        
            Student A         


        
3条回答
  •  無奈伤痛
    2021-01-06 20:43

    Use:

    /schools/school[student[not(../../school/student/id > id)]]/name
    

    Or shorter (just for this schema):

    /*/school[*/id[not(//id > .)]]/name
    

提交回复
热议问题