This should make use of ``\DOMDocument`` and CDATA sections, to make sure values are properly escaped (see for instance ``DetectArray``).