Is there any function that I can use to parse any string to ensure it won\'t cause xml parsing problems? I have a php script outputting a xml file with content obtained from
htmlspecialchars($trim($_POST['content'], ENT_XML1, 'UTF-8');
Should do it.