Handling XML special characters
Posted: Thu Mar 11, 2010 11:17 am
Hi Everyone,
Iam using DB2 API stage to read the data from DB2 Mainframe and creating xml files using xml output stage. I have a requirement to handle XML special characters in our data. There are few special characters that need to be escaped in the XML files.
Character Escaped Value
& -- &
< -- <'
" -- "
The above are the standard XML character entities that will produce invalid XML if the characters are directly present in any data values. we have to make this as a standard and do it any xml output.But the chances of getting these characters in the data are rare.
I have searched the forum and trying to implement using the Convert function. Could any one let me know what would be the best approach and the soultion .
Thanks in Advance
Iam using DB2 API stage to read the data from DB2 Mainframe and creating xml files using xml output stage. I have a requirement to handle XML special characters in our data. There are few special characters that need to be escaped in the XML files.
Character Escaped Value
& -- &
< -- <'
" -- "
The above are the standard XML character entities that will produce invalid XML if the characters are directly present in any data values. we have to make this as a standard and do it any xml output.But the chances of getting these characters in the data are rare.
I have searched the forum and trying to implement using the Convert function. Could any one let me know what would be the best approach and the soultion .
Thanks in Advance