Nested conditional if else statements in xpath

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

I have this XML:


    No
    Yes
    
           


        
4条回答
  •  遥遥无期
    2020-12-31 15:36

    Spent all day today, but works for me this is for Xpath 1.0:

    concat(
    substring(properties/property[@name="Headline"], 1, string-length(properties/property[@name="Headline"]) * 1), 
    substring(properties/property[@name="Name"], 1, not(number(string-length(properties/property[@name="Headline"]))) * string-length(properties/property[@name="Name"]))
    )
    

提交回复
热议问题