Fix up output xml so that original text is preserved.