XML : XPath - How to compare string and sequence?

XML in short:

  ...  <team>      <capitan>Zdeno Chara</capitan>      <alernativeCapitan>          <player>Zdeno Chara</player> <!-- NO Chara, he's the capitan obviously -->          <player>Someone Else</player>          <player>Someone Other</player>      </alernativeCapitan>  </team>  <team>      <capitan>Abc Edf</capitan>      <alernativeCapitan>         <player>Abc Xyz</player>         <player>Bac Edf</player>         <player>Abc 123</player>      </alernativeCapitan>  </team>  ...    

Q: How to compare one string (capitan) with sequence (alternativeCapitan) in XPath?

I wold like to know if capitain is also written like a alternative capitan / player. Comparasion only in one team. (If so, its wrong. Thats all, doesnt matter if the result will be boolean or number.)

Thanks.

No comments:

Post a Comment