added some testing code for the XML stream