How do I produce an xml with values inside <[CDATA[....]]>? This isn't working: Xml = [{blabla,[#xmlText{type = cdata, value = "sometext"}]}], lists:flatten(xmerl:export_simple(L, xmerl_xml, [{prolog, ["<?xml version=\"1.0\" encoding=\"utf-8\"?>"]}])) Sergej