Package xmlstream provides functions to manually construct XML in a manner suitable for streamed output.