Author |
Message
|
sweety176 |
Posted: Fri Sep 02, 2005 8:00 am Post subject: Carriage Returns and tabs in XML |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
I have my adapter which transforms XML messages.
The problem is when my XML contains tabs and/or carriage returns, my adapter doesnt work.But if i remove them the message passes through.
Is there a way I can accomodate for those tabs and/or carriage returns in my ESQL code.
Regards
Sowmya |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 8:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What is your "adapter"? A message flow? A custom node? An IBM Adapter?
If you look at a Trace node output of your message, as it is parsed, it should be clear about how to code your ESQL to remove or skip the elements in question. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sweety176 |
Posted: Fri Sep 02, 2005 9:17 am Post subject: adapter |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
My adapter is a compute node executing the ESQL code. |
|
Back to top |
|
 |
Tibor |
Posted: Sun Sep 04, 2005 3:18 pm Post subject: Re: Carriage Returns and tabs in XML |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
sweety176 wrote: |
I have my adapter which transforms XML messages.
The problem is when my XML contains tabs and/or carriage returns, my adapter doesnt work.But if i remove them the message passes through.
Is there a way I can accomodate for those tabs and/or carriage returns in my ESQL code. |
The broker builds an accurate logical message tree of the input - this is the parsing. For a better understanding, place a Trace Node (before Compute Node) into your message flow and study the difference.
You can find all whitespace elements (CR, tab, space) moreover you can address these just look the FIELDTYPE function in manual.
Another ESQL tricks here: http://www.mqseries.net/phpBB2/viewtopic.php?t=5008&
HTH,
Tibor |
|
Back to top |
|
 |
sweety176 |
Posted: Tue Sep 06, 2005 9:49 am Post subject: generic solution |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
I tried using FILEDNAME function and then TRIM. But then I realized that I have tabs in almost every line of the input message and I really dont know the location of tabs ,line feeds or carriage returns or if they exist as the next messages come by.So is there any generic solution i can implement in my compute node ESQL code so it can check and remove them.
Regards
Sweety |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 06, 2005 9:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you look at the links that Tibor posted?
You could also initially parse the message as BLOB, and use OVERLAY to remove whitespace characters. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|