1. A method comprising: receiving an unstructured document comprising a plurality of primitive elements, wherein each of the plurality of primitive elements is a character; performing a plurality of different processes for analyzing and manipulating the unstructured document in order to generate a structured document from the unstructured document; and storing a plurality of references associated with the plurality of primitive elements, wherein each of the references refers to a different primitive element of the plurality of primitive elements, wherein at least some of the references are stored in a separate memory space from the plurality of different processes and are shared by at least two different processes of the plurality of different processes, wherein the two different processes access the plurality of references by use of objects that refer to the plurality of references, wherein the plurality of references are not replicated by the two different processes.