- What are the special characters that will break an XML?
For example, the following xml works if there is no special characters in the value. But fails when I have & sign. I tried to wrap the value with CDATA syntax (<![CDATA[CITY & COUNTY]]>) but getting “Unexpected end of file while parsing CDATA has occurred. Line 44, position 122”
<Method ID="5">
<Field Type="Text" Name="Company" DisplayName="Company Name" FromBaseType="TRUE" >
<Default>Rob & Schnider Company</Default>
</Field>
</Method>
Additional Info (if needed): I am using SharePoint 2010 and it’s web services to set default values for certain columns in a document library.
Actually, since I am using Nintex for workflow there is function which takes care of the special characters. All you do is wrap the value with the the function.
Encodes a string to make it safe for viewing in html.
Example