function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
john yungkjohn yungk 

semicolons in a text attribute in outbound messages

Hi,

 

I've encountered a problem while using outbound messages that contain a semicolon (";") in text attributes. Salesforce appears to substitute the ";" for ";" as in the following sample:

 

<sf:Text__c>This is a test&semi; a test of semicolons</sf:Text__c>

 

The messages are processed by custom Java code that extracts the sObject nodes using javax.xml.xpath classes. XPath reports the following error:

 

org.xml.sax.SAXParseException: The entity "semi" was referenced, but not declared.
Exception in thread "main" java.lang.NullPointerException
 at com.test.TestNotificationsParsing.main(TestNotificationsParsing.java:39) 

 

I believe "&semi;" is not standard XML, so prior to processing the outbound message, code was added to search for "&semi" and substitute the ";" back in.

 

Question: Does anyone know why Salesforce may be doing the ";" to "&semi;" substitution?

 

Thanks,

John