Author |
Message
|
gabbar |
Posted: Thu Aug 14, 2003 6:24 am Post subject: XML Special Characters and Mainframe |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
Hello,
I have an interesting situation at hand. We have a broker running on Mainframe. Our message flows take the XML messages as input from the mainframe queues. To avoid the problem with special characters(', ", <, >, &), we have decided on wrapping such elements in CDATA sections like in the following example:
<ElemenName><![CDATA[ Our Data with special characters ]]></ElementName>
But the problem here is that, the emulator that we use, cannot type [ and ]. And at this point I am unable to find hex values for those characters in EBCDIC. We've tried hex codes based on an EBCDIC code page, but those didn't work.
I suppose that this is a fairly common problem for people working with XML, MQSI on mainframe.
My questions:
1. Is using CDATA sections a right solution?
2. If yes, can you provide me the hex values for [ and ] on mainframe?
If no, what is an alternate approach to deal with special characters.
Thanks
Last edited by gabbar on Thu Aug 14, 2003 9:44 am; edited 1 time in total |
|
Back to top |
|
 |
rwa |
Posted: Thu Aug 14, 2003 7:00 am Post subject: |
|
|
Voyager
Joined: 22 Jan 2002 Posts: 76 Location: Duesseldorf/Germany
|
Hi,
special characters can be written in there long form:
< <
> >
& &
' '
" " |
|
Back to top |
|
 |
gabbar |
Posted: Thu Aug 14, 2003 7:13 am Post subject: |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
Thanks for the reply. We chose not to replace those characters with their escape sequences due to performance issues. We found wrapping with CDATA is more efficient than checking each character in every message, specially when dealing with thousands of transactions. |
|
Back to top |
|
 |
scaryjase |
Posted: Fri Aug 15, 2003 2:20 am Post subject: |
|
|
Novice
Joined: 17 Jul 2003 Posts: 22
|
oh, the fun we've had with square brackets...
try DD and A8.
or try B1 and BB.
these might work. and then again... _________________ scary |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 15, 2003 3:23 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Which application is feeding your message flow? Is it running on M/F? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
gabbar |
Posted: Mon Aug 18, 2003 5:55 am Post subject: |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
Thanks for the reply. It's a COBOL application running on Mainframe. It just builds an XML String with CDATA sections in it. But, the characters [ and ] are not part of EBCDIC character set, so we cannot type them. We are using hex codes 0xAD and 0xBD instead, which was of not much help.
Thanks |
|
Back to top |
|
 |
gabbar |
Posted: Wed Aug 20, 2003 5:31 am Post subject: |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
For now we have resorted to replacing all the special characters with their escape sequences, to continue with the project. However, we would really like to use the CDATA sections. If anyone comes across a solution for this problem please update this post.
Thanks all for the replies. |
|
Back to top |
|
 |
gabbar |
Posted: Fri Oct 03, 2003 11:37 am Post subject: Solution |
|
|
Acolyte
Joined: 10 Dec 2002 Posts: 50
|
To wrap this topic:
BA and BB are the right hex codes for square brackets in EBCDIC. They worked for us.
Thanks all |
|
Back to top |
|
 |
|