Author |
Message
|
amigupta1978 |
Posted: Wed Mar 27, 2002 10:34 am Post subject: |
|
|
Centurion
Joined: 22 Jan 2002 Posts: 132 Location: India
|
Hi
I am using MQSI v2.1 on AIX4.3.3.
The problem I am facing is that I have to interact with the CICS adapter and some time CICS return me back the hexcharacters like 0x00, 0x01 etc, and when I append these characters to my XML message the XML parser breaks, so I want to remove this characters from the message. Currently I am doing something like searching each and evry character in the string and checking whether that character is printable or not, but this process is much more time consuming.
Is there any way in XML such that the charcater string can directly be converted to the HexValue such that I can directly search in the hex string of unprintable characters by just comparing the range?
Thanks in advance
Amit |
|
Back to top |
|
 |
kolban |
Posted: Wed Mar 27, 2002 10:52 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
XML data is supposed to only contain printable characters. These control characters don't fit that mold. You might want to consider a custom node (Java would be easiest) which would filter/translate the received data into a string and then in the following compute node do what you want wehn constructing the XML data. |
|
Back to top |
|
 |
amigupta1978 |
Posted: Wed Mar 27, 2002 4:46 pm Post subject: |
|
|
Centurion
Joined: 22 Jan 2002 Posts: 132 Location: India
|
Hi
Thnx for the suggestion,
But actually I didnt want to write a plugin node for this purpose, since the CICScustom node is behaving normally in most of the cases , its only when some problem happens in the IDMS it gives me the low hex characters (0x00,0x01). So I was just thinking of a better way that I can handle in my MQSI flow. Currently I am traversing through each and every character in the output message and searching for that character in the printable character.
So just wanted to make this processing fast, if somehow i cud convert my character string to BLOB and then i can directly check the bytes in the printable range??
thnx
amit |
|
Back to top |
|
 |
kolban |
Posted: Wed Mar 27, 2002 9:32 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
I think what I was trying to suggest was a custom node that would quickly scan the string/blob looking for improper characters and replace those with the ones you want or delete them. |
|
Back to top |
|
 |
Segs |
Posted: Thu Mar 28, 2002 11:40 am Post subject: |
|
|
Voyager
Joined: 04 Oct 2001 Posts: 78 Location: Zurich Financial Services
|
Would the XML as is element help you out. This allows you to put text into XML without the parser trying to correct it. |
|
Back to top |
|
 |
amigupta1978 |
Posted: Thu Mar 28, 2002 5:17 pm Post subject: |
|
|
Centurion
Joined: 22 Jan 2002 Posts: 132 Location: India
|
Hi
Thnx for the suggestions.
I tried (XML.AsisElementContent) but still no luck
and ya I too was saying abt the custom node for string/blob parsing for the data returned to me by the CICS node....(not the CICS node itself... ). Actually I face this problem sometimes only when some abrupt error happens in CICS, so I would not like to add another node for checking every message. Since this condition is only happening when I get some abrupt error so I am checking every character in the error handling. Ya but there I have to now search for every character returned to me by the CICS to see whetheter or not there is some unprintable character. but I think doing this in a Compute node is quite costly since I had to use a loop using substring and then compare each and every character with the printable character, so trying to find out is there a better way to achieve this.
Thnx,
Amit
|
|
Back to top |
|
 |
|