Get the non-empty element using XPATH

后端 未结 4 2011
情歌与酒
情歌与酒 2020-12-31 00:34

I have the following XML



  
    
  
  

        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 01:02

    It actually can be simplified as below:

    //group/p1[string-length() > 0]    => element text is non-empty
    //group/p1[string-length() = 6]    => element text has length 6
    

提交回复
热议问题