Sid;
It is an xml parser problem. It is not able to parse your & character. It is a special character issue. Need to use encoding and decoding special characters. Check if encoding input parameter set to UTF-8 helps. you can aslo use CDATA to ignore the content in tags. check other posts in the forum regarding special character issue.
The escape characters like <, >, & etc… are changed to entity reference like <, >, & etc… when being parsed. So you are getting the correct value in MS9501-&. Just assign UTF-8 to ‘encoding’ and true to ‘isXML’ Service-in parameters of pub:xml:xmlStringToXMLNode.
I am facing the similar issue with pub.xml:queryXMLNode service, Tried even assigning UTF-8 to ‘encoding’ and true to ‘isXML’ Service-in parameters of pub.xml:xmlStringToXMLNode but still could not resolve the issue.
Below is the sample XML:
<?xml version="1.0"?>
British
Mahesh
Sr. Manager, System Eng. & Data Center
Error:
com.wm.lang.flow.WattEvaluationException: com.wm.lang.xml.WMDocumentException: [ISC.0042.9332] Malformed entity reference: & Data Center
For the service pub.xml:documentToXMLString, you’ll need to set the service input parameter ‘encode’ to true for the functionality desired.
See documentation "9-X_Integration_Server_Built-In_Services", for information about the input parameter ‘encode’ which states the following:
"String Optional. Flag indicating whether to HTML-encode the data. Set this parameter to true if your XML data contains special characters, including the following:
< > & " ’
Set to:
true - to HTML-encode the data.
For example, the string expression 5 < 6 would be converted to 5 < 6, which is valid.
false - to not HTML-encode the data. This is the default.
For example, the string expression 5 < 6 would be converted to 5 < 6, which is invalid."
Site set the input parameter ‘encode’, for service pub.xml:documentToXMLString, to ‘true’ and problem resolved.