A method and apparatus are disclosed for streaming XML content in a manner that
allows the receiver to decode the XML data that is actually received, even if an
entire XML document is not received. Each XML document is decomposed and encoded
as a collection of sub-trees. Each sub-tree from the larger XML document tree can
be parsed and validated by the XML receiver as if it is an independent tree. Each
streamed XML document utilizes a structure node that serves as a sub-tree wrapper
function around each independent sub-tree. The structure node indicates the relationship
of the sub-tree to other sub-trees, thereby allowing the XML receiver to reconstruct
the full tree.