Patent ID: 8768900

Claim:
A computer-implemented method for processing an XML document having a corresponding Schema, the method comprising a compressing stage and a decompressing stage, wherein the compressing stage comprises: extracting structure content and data content of the XML document; determining path coding of a node in the structure content, and data content corresponding to the node according to a pre-stored preorder of the node, wherein the path coding of the node identifies a storage position of the node in the structure content; compressing the determined path coding of the node and the determined data content, and generating document structure information during the compression, wherein the document structure information comprises a preorder of the node and a preorder of the determined data content; and compressing the generated document structure information; and wherein the decompressing stage comprises: obtaining the compressed path coding of the node and compressed document structure information; decompressing the compressed path coding of the node to obtain the node corresponding to the decompressed path coding; and decompressing the compressed document structure information; when a sequence length of the preorder of the data content corresponding to a path coding identical to the decompressed path coding of the node is not zero the method further comprises: determining data content corresponding to a preorder which is larger than the preorder of the decompressed node and smaller than a preorder of a next node in a path as the data content corresponding to the decompressed node.