To search a attribute via XPATH. you can use Element[@Attr] to address it in XPATH.

So~~ to search some specific search as follow:

  1. product@cost which is > 5000, you can write as follow.

product[@cost > ‘5000’]

  1. product@name contains “yellow” (case-insensitivity).

contains(translate(product[@name], ‘ABC…Z’, ‘abc….z’), translate(‘yellow’, ‘ABC…Z’, ‘abc….z’))


Buy Me A Coffee

Evan

Attitude is everything