Thanks Marco and Andy.
I will go with XPath selectors and eval for now. John Snelson's library is indeed interesting and a while ago I tried the parser part for parsing XQuery into XML. I don't either understand it fully but it seems to do it's job.
--Marc