Or, rather, have a factory method in NodeList that accepts the Document and the query content, and returns a NodeList instance.