More robustness in XML conversion.