
A stream buffer is a stream-based representation of an xml info-set in java. stream buffers are designed to: provide very efficient stream-based memory representations of xml info-sets; and be created and processed using any java-based xml api.
conceptually a stream buffer is similar to the representation used in the xerces deferred dom implementation, with the crucial difference that a stream buffer does not store hierarchical information like parent and sibling information. the deferred dom implementation reduces memory usage when large xml documents are parsed but only a subset of the document needs to be processed. (note that using deferred dom will be more expensive than non-deferred dom in terms of memory and processing if all the document is traversed.)
stream buffers may be used as an efficient alternative to dom where: * most or all of an xml info-set will eventually get traversed; and/or * targeted access to certain parts of an xml info-set are required
and need to be efficiently processed using stream-based apis like
sax or stax.