I have a problem with finding a good method to handle a xml in a way of finding the index of a node. 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". And if true it should tell me the index of the node. So in this case node[1].