Streaming XML documents

Sometimes source documents are too large to hold in memory. Saxon-EE provides a range of facilities for processing such documents in streaming mode: that is, processing data as it is read by the XML parser, without building a complete tree representation of the document in memory.

These facilities are closely aligned with the XSLT 3.0 Recommendation. Some facilities are specific to Saxon, and a few facilities are also available in XQuery.

Inevitably there are things that cannot be done in streaming mode - sorting is an obvious example. Sometimes, achieving a streaming transformation means rethinking the design of how it works - for example, splitting it into multiple phases. So streaming is rarely a case of simply taking your existing code and setting a simple switch to request streamed implementation.

See the topics below for further information: