Anybody know how to set the value of an XmlUpdate MSBuild task so that the output is wrapped in a CDATA section?
I’ve tried:
Value="<![CDATA[@(Readme)]]>"
and
Value="<![CDATA[@(Readme)]]>"
But both output HTML encoded < and > tags.
Many thanks
Matt
CDATA is just a convenience for outputting text without having to escape special characters such as
<>&"'. SinceXmlUpdatedoes properly escape the text it should not be necessary to require a CDATA section; the XML will be equivalent.