Thankyou very much for your response mhkay.
Unfortunately I don't really understand the solution you're describing. Maybe it would be clearer if I were more specific.
I have an array of languages that looks like:
which I'm storing in a variable called $lang.
I then have the data object which looks like:
How can I write a single XPath query to get the first available translation from the Translation node which matches languages in order from $lang, retrieve the title, and only get the first one?