This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I am guessing you already have a Document, and you want to use XPath expressions to extract a specific set of nodes from the document. Yes, you can do that using classes in the javax.xml.xpath package. However, an XPath expression always returns a list of nodes and not a document, so you can't create a new Document using XPath. And I'm not sure what this "framework" is which you're asking about.