Made abstraction over with-stream-xml-input/output for stanzas.