I have been using cts:search with searchable-expression to extract specific elements from XML documents. For example:
cts:search
Document: