📜  XPath比较运算符

📅  最后修改于: 2020-12-26 07:00:08             🧑  作者: Mango

XPath比较运算符

XPath中使用的比较运算符列表:

Index Operator Description
1) = It specifies equals to
2) != It specifies not equals to
3) < It specifies less than
4) > It specifies greater than
5) <= It specifies less than or equals to
6) >= It specifies greater than or equals to

XPath比较运算符示例

让我们举个例子来说明比较运算符的使用。在这里,我们创建一个表元素具有其属性ID及其子元素,方法是遍历每个员工。它检查薪水是否大于(>)25000 ,然后打印详细信息。

Employee.xml




   
      Abhiram
      Kushwaha
      Manoj
      15000
   
   
      Akash
      Singh
      Bunty
      25000
   
    
      Brijesh
      Kaushik
      Ballu
      20000
   
    
      Zoya
      Mansoori
      Sonam
      30000
   

员工.xsl


  
   
      
         
            

Employee

ID First Name Last Name Nick Name Salary

输出: