Hi,
I have a number of jobs creating XML messages.
One job is based on customer data, and so one of the fields involved is surname. This is causing a problem with apostrophes.
if the input data is "O'Brien", then it is being presented in the XML as <SURNAME>O'Brien<\SURNAME>.
Is there anyway to get it to present as <SURNAME>O'Brien<\SURNAME>?
Thanks for the help.
John Fitz
XML Output Stage and apostrophes
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
Craig,
the data is required to be placed in a further CDATA[] tag.eg <CARD_HOLDER_NAME><![CDATA[MS B NIC GIOLLA PHADRAIG]]></CARD_HOLDER_NAME>
this is a third party requirement that i have no control over.
the net effect of such a tag is to tell the parser to treat it's contents as text and not xml, and so the "&apos" is written to the DB.
As you say the "apos" is the correct representation, and that probably ends this conversation. i can get round it by using a convert function in a transformation stage ater the xml is created.
the real issue is that the XML stage cannot handle the CDATA[] requirement. i also having to add this manually to each xml field on the message.
Craig, thanks as always for coming back to me. i will leave this post open for a while in case you have any thoughts on the CDATA issue.otherwise i will mark it resolved at the end of the day
thanks again,
john fitz
the data is required to be placed in a further CDATA[] tag.eg <CARD_HOLDER_NAME><![CDATA[MS B NIC GIOLLA PHADRAIG]]></CARD_HOLDER_NAME>
this is a third party requirement that i have no control over.
the net effect of such a tag is to tell the parser to treat it's contents as text and not xml, and so the "&apos" is written to the DB.
As you say the "apos" is the correct representation, and that probably ends this conversation. i can get round it by using a convert function in a transformation stage ater the xml is created.
the real issue is that the XML stage cannot handle the CDATA[] requirement. i also having to add this manually to each xml field on the message.
Craig, thanks as always for coming back to me. i will leave this post open for a while in case you have any thoughts on the CDATA issue.otherwise i will mark it resolved at the end of the day
thanks again,
john fitz
John Fitz
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am