1. A method in a computing device for generating a wrapper for hierarchically organized documents, each document having a document tree, the method comprising: creating a wrapper tree for a document tree; selecting a document tree whose distance to the wrapper tree is within a threshold; and adjusting the wrapper tree based on the document tree wherein the wrapper is based on the adjusted wrapper tree.