This paper proposes a new method for XML compression called XML Zipping and Querying (XZAQ) which can compress a regular XML file and query the compressed XML file without doing full decompression. XZAQ is based on non-homomorphic method which does not preserve an interleaving between an element structure and data content. XZAQ is implemented by using grammar-based method to encode an element structure and to maintain links between the element structure and the data content. XZAQ can partially decompress a block of compressed data in order to support querying of XML data. From the experiments XZAQ had an average compression ratio of 70 % smaller than original size. It also provided better compression ratio of 10% less than XGRIND. Moreover XZAQ could support either exact-match or range in both simple and complex query types whereas XGRIND could provide only found or not found match