Xml Stream handling corrected