Fast extraction of scalar values from binary encoded XML
First Claim
1. A method comprising:
- receiving a query that requires one or more XML nodes that are binary-encoded;
in response to receiving the query, requesting binary-encoded XML data from one or more data sources, wherein the binary-encoded XML data is a compact binary representation of textual XML data;
determining that a particular node reflected in the binary-encoded XML data satisfies one or more criteria of the query;
after determining that the particular node satisfies one or more criteria of the query and before extracting content of the particular node, determining whether the particular node is simple or complex, wherein a node is simple if the node has no child elements and no associated attributes, wherein a node is complex if the node has at least one child element or at least one attribute;
if it is determined that the particular node is complex, then extracting, from the binary-encoded XML data, a scalar value of the particular node by performing a first set of one or more operations;
if it is determined that the particular node is simple, then extracting, from the binary-encoded XML data, a scalar value of the particular node without performing the first set of one or more operations;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for efficiently extracting scalar values from binary-encoded XML data. Node information is stored in association with binary-encoded XML data to indicate whether one or more nodes of an XML document are simple or complex. A node is simple if the node has no child elements and no attributes. The node information of a particular node is used to determine whether a particular node, identified in a query, is simple or complex. If the particular node is simple, then the scalar value of the particular node is identified without performing any operations other than possibly converting the scalar value to a non-binary-encoded format or converting the scalar value to a value of a different data type.
173 Citations
26 Claims
-
1. A method comprising:
-
receiving a query that requires one or more XML nodes that are binary-encoded; in response to receiving the query, requesting binary-encoded XML data from one or more data sources, wherein the binary-encoded XML data is a compact binary representation of textual XML data; determining that a particular node reflected in the binary-encoded XML data satisfies one or more criteria of the query; after determining that the particular node satisfies one or more criteria of the query and before extracting content of the particular node, determining whether the particular node is simple or complex, wherein a node is simple if the node has no child elements and no associated attributes, wherein a node is complex if the node has at least one child element or at least one attribute; if it is determined that the particular node is complex, then extracting, from the binary-encoded XML data, a scalar value of the particular node by performing a first set of one or more operations; if it is determined that the particular node is simple, then extracting, from the binary-encoded XML data, a scalar value of the particular node without performing the first set of one or more operations; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 10, 23, 25)
-
-
9. A computer-implemented method comprising:
-
determining that a node in an XML representation contains an XML value to extract, wherein the XML representation is a compact representation of an XML document that comprises textual XML data; wherein the XML representation is a binary-encoding of one or more nodes of the XML document; before extracting the XML value, determining whether the node is simple or complex, wherein a node is simple if the node has no child elements and no associated attributes, wherein a node is complex if the node has at least one child element or at least one attribute; if it is determined that the node is complex, then extracting, from the XML representation, content of the node by performing a first set of one or more operations; and if it is determined that the node is simple, then extracting, from the XML representation, content of the node without performing the first set of one or more operations; wherein the method is performed by one or more computing devices. - View Dependent Claims (11)
-
-
12. One or more non-transitory machine-readable storage media storing instructions which, when executed by one or more processors, cause:
-
receiving a query that requires one or more XML nodes that are binary-encoded; in response to receiving the query, requesting binary-encoded XML data from one or more data sources, wherein the binary-encoded XML data is a compact binary representation of textual XML data; determining that a particular node reflected in the binary-encoded XML data satisfies one or more criteria of the query; after determining that the particular node satisfies one or more criteria of the query and before extracting content of the particular node, determining whether the particular node is simple or complex, wherein a node is simple if the node has no child elements and no associated attributes, wherein a node is complex if the node has at least one child element or at least one attribute; if it is determined that the particular node is complex, then extracting, from the binary-encoded XML data, a scalar value of the particular node by performing a first set of one or more operations; if it is determined that the particular node is simple, then extracting, from the binary-encoded XML data, a scalar value of the particular node without performing the first set of one or more operations. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 24, 26)
-
-
21. One or more non-transitory machine-readable storage media storing instructions which, when executed by one or more processors, cause:
-
determining that a node in an XML representation contains an XML value to extract, wherein the XML representation is a compact representation of an XML document that comprises textual XML data; wherein the XML representation is a binary-encoding of one or more nodes of the XML document; before extracting the XML value, determining whether the node is simple or complex, wherein a node is simple if the node has no child elements and no associated attributes, wherein a node is complex if the node has at least one child element or at least one attribute; if it is determined that the node is complex, then extracting, from the XML representation, content of the node by performing a first set of one or more operations; and if it is determined that the node is simple, then extracting, from the XML representation, content of the node without performing the first set of one or more operations. - View Dependent Claims (22)
-
Specification