Fixed error when invalid xml chars present in document
Merge branch 'clean_xml'