Add a method to return the node given the document