No exercises, but pretty helpful docs and examples, can be found here: https://docs.mendix.com/refguide/xpath
I did write something about a special type of xpath. But it currently is in german. https://mendixandme.de/index.php/2020/02/26/bedingte-xpath-constraints/
[EDIT]
The english Version can be found here: https://medium.com/@gandy84/conditional-xpath-constraints-mendix-and-me-adb1ba573e28