Nested conditional if else statements in xpath

前端 未结 4 1120
迷失自我
迷失自我 2020-12-31 15:12

I have this XML:


    No
    Yes
    
           


        
4条回答
  •  不知归路
    2020-12-31 15:31

    Becker's method for your data is the following:

    concat(substring('Rent',      1 div boolean(propertyTypes/propertyType ="RESIDENTIAL" and leasehold="Yes")),
           substring('Buy',       1 div boolean(propertyTypes/propertyType ="RESIDENTIAL" and leasehold="No")),
           substring('Leasehold', 1 div boolean(propertyTypes/propertyType!="RESIDENTIAL" and leasehold="Yes")),
           substring('Freehold',  1 div boolean(propertyTypes/propertyType!="RESIDENTIAL" and leasehold="No")))
    

提交回复
热议问题