+ Start a Discussion
kmadminkmadmin 

Character reference "&#x13" is an invalid XML character

I get the above error when trying to perform an Upsert. I have escaped text fields using SecurityElement.Escape function but still get the above error. Below is the WebResponse:

 

  <?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Body>
- <soapenv:Fault>
  <faultcode>soapenv:Client</faultcode>
  <faultstring>Character reference "&#x13" is an invalid XML character.</faultstring>
  </soapenv:Fault>
  </soapenv:Body>
  </soapenv:Envelope>

 

SuperfellSuperfell

There are certain characters that are not valid in XML, regardless of how you encode them, you'll need to remove the offending character from the data your trying to send to salesforce.