Situation:
We are passing this element into a data mapper from a file source:
<Complaint>DATA < LESS > GREATER & AND ' APOS " QUOTE</Complaint>
The element is mapped to an output element with no changes. The resulting XML document contains this:
<Complaint>DATA < LESS > GREATER & AND ' APOS " QUOTE</Complaint>
The partner with whom we are communicating is asking that we escape the apostrophy and quote in the output XML document with their corresponding pre-defined entities: ' and "e;
Is there a simple way to do this short of passing the output stream through a custom plug-in to search for these characters?
Solution:
"'" and """ are the identifier that data mapper also uses in data mapping to manage the data that has apostrophe and quotes in XML.
If you want to retain such identifiers in data mapping, please try to put such data in CDATA section on both source and target.
For example in your case :-
your source data should appear as :-- <Complaint><![CDATA[DATA < LESS > GREATER & AND ' APOS " QUOTE]]></Complaint>
In target node of the XML enable CDATA section in data mapping, which can be done by going to Action Menu and select option “Cdata section elements”, place the target node name in the value and save.
Comments
0 comments
Article is closed for comments.