1. A method comprising: receiving one or more criteria that identifies nodes within one or more XML documents to exclude from query evaluation; based on the one or more criteria, generating a representation of the one or more XML documents that excludes the identified nodes; receiving a query that specifies a path operation based on a path, wherein one or more of said identified nodes is under said path in the one or more XML documents; and using the representation to compute the path operation as if the one or more of said identified nodes is not in the one or more XML documents; wherein the method is performed by one or more computing devices.