Hi, This is probably a stupid question, but what is method of cleanly shutting down an XMLStream (such that it sends the terminating </stream> and closes the connection). Thanks, Steve