+ Start a Discussion
john yungkjohn yungk 

semicolons in a text attribute in outbound messages



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?