We are having a problem parsing XML that has an "&" contained within one of the elements.
We are receiving an error
"An error occurred while parsing EntityName"
when the following code is run because one of the elements has an "&"
System.Int32 complaintID = Convert.ToInt32(SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields["complaint"].Value,"newComplaint/newID"));
This is not the element that has the "&", so we are assuming it tries to parse the whole XML string and complains.
is there any way of changing any "&" in the XML fields in order that this may not happen.
Page 1 / 1
We're having sort of the same issue. When creating items on sharepoint lists where the values contains "&" K2 inserts & into the item... We need to find a work around for this...
K2.net follows the conventions for well-formed XML. This means that even element values are evaluated remember that as the following characters are frequently used to define an XML document it is advisable to replace them with their entitity reference:
- & replaces the ampersand (&) character
- < replaces the less than (<) character
- > replaces the greater than (>) character
- ' replaces the single quote or apostrophe (') character
- " replaces the double quote (") character
Hope this helps a little
Lori
- & replaces the ampersand (&) character
- < replaces the less than (<) character
- > replaces the greater than (>) character
- ' replaces the single quote or apostrophe (') character
- " replaces the double quote (") character
Hope this helps a little
Lori
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.