Reducing memory requirements needed to represent XML entities
First Claim
1. A method used in accessing and storing a hierarchical tree representation of elements that reside in a body of data, the method comprising the steps of:
- parsing said body of data to generate in memory a node tree that represents elements that reside in the body of data and that reflects a hierarchical tree relationship between said elements in said body of data;
after said generating said node tree, said body of data includes certain elements for which there is no corresponding node in the node tree;
wherein a first node in said node tree;
corresponds to a first element in said body of data, wherein said first element contains a second element, said first element being hierarchically related to the second element as an ascendant of said second element, andincludes first element location data identifying the location of the first element within said body of data;
after said generating in memory said node tree and while said node tree is in memory, receiving a request that requires access to a second node in said node tree, wherein said second node corresponds to the second element in said body of data;
in response to receiving said request, determining that said second node is not in memory; and
in response to determining that said second node is not in memory;
using said first element location data to locate where within said body of data to begin parsing to extract data that is contained within the first element for said second element, andgenerating said second node based on said extracted data.
2 Assignments
0 Petitions
Accused Products
Abstract
Described herein are approaches that allow an XML entity to be accessed in a way that requires less memory. These approaches involve dynamically generating and maintaining an in-memory representation of only a portion of an XML tree. The in-memory representation of an XML tree is herein referred to as a node tree. The node tree contains data from the XML tree, and is generated by extracting data from a compressed form of an XML entity. In addition, the node tree contains information about the location of specific elements within the compressed XML entity. The approaches described herein allow an XML tree to be accessed without having to generate an in-memory representation of the whole XML tree, thus reducing the amount of memory needed to access the data in the XML tree.
45 Citations
24 Claims
-
1. A method used in accessing and storing a hierarchical tree representation of elements that reside in a body of data, the method comprising the steps of:
-
parsing said body of data to generate in memory a node tree that represents elements that reside in the body of data and that reflects a hierarchical tree relationship between said elements in said body of data; after said generating said node tree, said body of data includes certain elements for which there is no corresponding node in the node tree; wherein a first node in said node tree; corresponds to a first element in said body of data, wherein said first element contains a second element, said first element being hierarchically related to the second element as an ascendant of said second element, and includes first element location data identifying the location of the first element within said body of data; after said generating in memory said node tree and while said node tree is in memory, receiving a request that requires access to a second node in said node tree, wherein said second node corresponds to the second element in said body of data; in response to receiving said request, determining that said second node is not in memory; and in response to determining that said second node is not in memory; using said first element location data to locate where within said body of data to begin parsing to extract data that is contained within the first element for said second element, and generating said second node based on said extracted data. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method used in accessing and storing a hierarchical tree representation of elements that reside in a body of data, the method comprising the steps of:
-
receiving a request that requires access to a first node in a node tree that reflects a hierarchical tree relationship between said elements in said body of data, said node tree residing in a memory, wherein said first node corresponds to a first element in said body of data; wherein a second node in said node tree; corresponds to a second element in said body of data, said second element being hierarchically related to the first element, and includes a plurality of flags that include a certain flag, wherein; each flag of said plurality of flags only indicates whether a node that corresponds to an element having a particular hierarchical relationship to said second element resides within said memory; each flag of said plurality of flags represents a different hierarchical relationship than that represented by any other flag of said plurality of flags; each flag of said plurality of flags is set to one of two states, said two states comprising a first state as TRUE and a second state as FALSE; one of the TRUE and FALSE states indicates that said node that corresponds to an element having a particular hierarchical relationship to said second element resides within said memory; and the other of the TRUE and FALSE states indicates that said node that corresponds to said element having a particular hierarchical relationship to said second element does not reside within said memory; examining the certain flag of said second node to determine whether said first node resides in the memory; and determining that said first node does not reside in said memory; and in response to determining that said first node does not reside in said memory; parsing said body of data to extract data for said first element, and generating said first node in the memory based on the extracted data. - View Dependent Claims (7, 8, 9, 10, 11, 12)
-
-
13. A computer-readable storage medium carrying one or more sequences of instructions for accessing and storing a hierarchical tree representation of elements that reside in a body of data, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
parsing said body of data to generate in memory a node tree that represents elements that reside in the body of data and that reflects a hierarchical tree relationship between said elements in said body of data; after said generating said node tree, said body of data includes certain elements for which there is no corresponding node in the node tree; wherein a first node in said node tree; corresponds to a first element in said body of data, wherein said first element contains a second element, said first element being hierarchically related to the second element as an ascendant of said second element, and includes first element location data identifying the location of the first element within said body of data; after said generating in memory said node tree and while said node tree is in memory, receiving a request that requires access to a second node in said node tree, wherein said second node corresponds to the second element in said body of data; in response to receiving said request, determining that said second node is not in memory; and in response to determining that said second node is not in memory; using said first element location data to locate where within said body of data to begin parsing to extract data that is contained within the first element for said second element, and generating said second node based on said extracted data. - View Dependent Claims (14, 15, 16, 17)
-
-
18. A computer-readable storage medium carrying one or more sequences of instructions for accessing and storing a hierarchical tree representation of elements that reside in a body of data, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
receiving a request that requires access to a first node in a node tree that reflects a hierarchical tree relationship between said elements in said body of data, said node tree residing in a memory, wherein said first node corresponds to a first element in said body of data; wherein a second node in said node tree; corresponds to a second element in said body of data, said second element being hierarchically related to the first element, and includes a plurality of flags that include a certain flag, wherein; each flag of said plurality of flags only indicates whether a node that corresponds to an element having a particular hierarchical relationship to said second element resides within said memory; each flag of said plurality of flags represents a different hierarchical relationship than that represented by any other flag of said plurality of flags; each flag of said plurality of flags is set to one of two states, said two states comprising a first state as TRUE and a second state as FALSE; one of the TRUE and FALSE states indicates that said node that corresponds to an element having a particular hierarchical relationship to said second element resides within said memory; and the other of the TRUE and FALSE states indicates that said node that corresponds to said element having a particular hierarchical relationship to said second element does not reside within said memory; examining the certain flag of said second node to determine whether said first node resides in the memory; and determining that said first node does not reside in said memory; and in response to determining that said first node does not reside in said memory; parsing said body of data to extract data for said first element, and generating said first node in the memory based on the extracted data. - View Dependent Claims (19, 20, 21, 22, 23, 24)
-
Specification