Small enhancement to the XML stream parser