1. A method for handling path-based queries, the method comprising the steps of: receiving a path-based query that specifies a path associated with data in an XML document; generating, based on the path, an index-enabled query that accesses an XML index that indexes a plurality of XML documents, including said XML document; and executing the index-enabled query to use said XML index to retrieve said data required by the path-based query.