Updated process_stanza to stop right before xmlstreamend