gracefully fail when parsing xml with non-compatible string (TNL-347)

@symbolist 
@waheedahmed