Hi Christian,
The usual approach is to simply create another database that only contains the relevant parts of your document. This can directly be done in XQuery (using db:create, db:add, ...), or, if memory consumption is too high, by exporting and importing parts of your document.
I couldn't find an option in db:add to specificy an XPath. In my case, I need to extract only the elements under /gmd:MD_Metadata/gmd:identificationInfo/sdn:SDN_DataIdentification
With kind regards, Menashè