convert_xml_special_chars: factor