What is an alternative to this XPath //div[@id=\'foo\'] in GPath? In general, where I can find this documentation?
//div[@id=\'foo\']
what you need is this:
def root = new XmlSlurper().parseText(.toURL().text) def foundNode = root.'**'.find{ it.@id == "foo" }
its the double * that will let you find it without knowing the path. At least this is how I do it.