Efficient piece-wise updates of binary encoded XML data
First Claim
1. A computer-implemented method comprising:
- receiving a request to make a modification to an XML document that is stored in a compact binary form, said request specifying to modify a set of one or more nodes;
in response to said request;
identifying a first node of the XML document for which a particular modification is requested;
generating one or more first encoded values to represent, within said compact binary form, said first node according to said particular modification requested;
generating one or more second encoded values to represent, within said compact binary form, a second node of the XML document, wherein the request does not request to modify the second node in the XML document, wherein said particular modification of the first node causes a change in a representation of the second node within said compact binary form because the first node and the second node are consecutive nodes within said XML document and have an identical tag name in a character form, wherein the tag name of said first node and the tag name of said second node are together replaced, within said compact binary form, by a single token id followed by an opcode, said single token id being a value different than said tag name of said first node and different than said opcode, said opcode specifying that a respective node for said opcode has a tag name that is identical to a tag name of a previous node;
based on said one or more first and second encoded values, computing parameters that characterize a change to the compact binary form of the XML document;
inserting, based on the parameters, the one or more first and second encoded values directly into the compact binary form of the XML document; and
wherein the method is performed by one or more computer systems.
1 Assignment
0 Petitions
Accused Products
Abstract
An XML document can be represented in a compact binary form that maintains all of the features of XML data in a useable form. In response to a request for a modification (e.g., insert, delete or update a node) to an XML document that is stored in the compact binary form, a certain representation of the requested modification is computed for application directly to the binary form of the document. Thus, the requested modification is applied directly to the persistently stored binary form without constructing an object tree or materializing the XML document into a corresponding textual form. Taking into account the nature of the binary form in which the document is encoded, the bytes that actually require change are identified, including identifying where in the binary representation the corresponding actual changes need to be made.
94 Citations
12 Claims
-
1. A computer-implemented method comprising:
-
receiving a request to make a modification to an XML document that is stored in a compact binary form, said request specifying to modify a set of one or more nodes; in response to said request; identifying a first node of the XML document for which a particular modification is requested; generating one or more first encoded values to represent, within said compact binary form, said first node according to said particular modification requested; generating one or more second encoded values to represent, within said compact binary form, a second node of the XML document, wherein the request does not request to modify the second node in the XML document, wherein said particular modification of the first node causes a change in a representation of the second node within said compact binary form because the first node and the second node are consecutive nodes within said XML document and have an identical tag name in a character form, wherein the tag name of said first node and the tag name of said second node are together replaced, within said compact binary form, by a single token id followed by an opcode, said single token id being a value different than said tag name of said first node and different than said opcode, said opcode specifying that a respective node for said opcode has a tag name that is identical to a tag name of a previous node; based on said one or more first and second encoded values, computing parameters that characterize a change to the compact binary form of the XML document; inserting, based on the parameters, the one or more first and second encoded values directly into the compact binary form of the XML document; and wherein the method is performed by one or more computer systems. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory machine-readable medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform steps comprising:
-
receiving a request to make a modification to an XML document that is stored in a compact binary form, said request specifying to modify a set of one or more nodes; in response to said request; identifying a first node of the XML document for which a particular modification is requested; generating one or more first encoded values to represent, within said compact binary form, said first node according to said particular modification requested; generating one or more second encoded values to represent, within said compact binary form, a second node of the XML document, wherein the request does not request to modify the second node in the XML document, wherein said particular modification of the first node causes a change in a representation of the second node within said compact binary form because the first node and the second node are consecutive nodes within said XML document and have an identical tag name in a character form, wherein the tag name of said first node and the tag name of said second node are together replaced, within said compact binary form, by a single token id followed by an opcode, said single token id being a value different than said tag name of said first node and different than said opcode, said opcode specifying that a respective node for said opcode has a tag name that is identical to a tag name of a previous node; based on said one or more first and second encoded values, computing parameters that characterize a change to the compact binary form of the XML document; and inserting, based on the parameters, the one or more first and second encoded values directly into the compact binary form of the XML document. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification