Implement our own output buffering inside saxdb.