I have a problem with finding a good method to handle a xml in a way of finding some nodes in between other nodes. Example:
String test = '''
<Library>
<Books>
<Book>
<Title>Hello</Title>
<Author>John Doe</Author>
<Publication>2008</Publication>
</Book>
<Book>
<Title>Bye</Title>
<Author>Mary Derp</Author>
<Publication>2011</Publication>
</Book>
[...]
</Books>
</Library>'''
def xml = new XmlSlurper().parseText(test)
Now I want to know if there is any book where the title is "Bye" and the author is "Mary Derp". The first thing that comes to mind is the find-method but that looks for any appearence of "Bye" and "Mary Derp".
So for example the method should look for the title "Hello" and the author "Mary Derp" and it should say false because there is no book with this title and author.