I\'m new to Grails/Groovy and am trying to find a node in a an xml file; I\'ve figured out how to iterate over all of them, but I want to exit the loop when the target node is f
I think this should work too, stopping at the first match.
def result = records.children().find { domain -> if (domain.@domain_name == targetDomain) { // Do stuff ... return true } else { return false } }