|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Replacing <and > in esql |
« View previous topic :: View next topic » |
Author |
Message
|
vijayakumar |
Posted: Fri Sep 24, 2010 1:53 am Post subject: Replacing <and > in esql |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
In my esql , i want to replace < with < and > with > in esql .
I tried the code like
set OutputRoot.XMLNS.PayloadAttribute.Messages.messageData = InputRoot.XML.PayloadAttribute
set OutputRoot.XMLNS.PayloadAttribute.Messages.messageData =
replace(OutputRoot.XMLNS.PayloadAttribute.Messages.messageData,'<','<');
But it s not replacing the < with < .
May i know we cant try like this . Please someone suggest . |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 24, 2010 4:04 am Post subject: Re: Replacing <and > in esql |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijayakumar wrote: |
In my esql , i want to replace < with < and > with > in esql . |
a) why exactly would you want or need to?
b) what exactly happened when you tried it?
c) what exactly have you already tried to diagnose & resolve the problem before posting here?
d) does this have anything to do with this post, where you're trying to deal (possibly ineptly & without CDATA) with an embedded XML document?
You've been told before we're not a training resource, nor are we going to step by step you through every problem you hit in your development. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ajit1981 |
Posted: Fri Sep 24, 2010 4:26 am Post subject: |
|
|
Apprentice
Joined: 09 Apr 2010 Posts: 41 Location: Bangalore, Inida
|
Hi Vijay,
Try like this, hopefully it will work,
First Cast your whole message in Blob, and '<' and '>' also (decalre some variable name and cast and store this blob value in variable) .
for message u can use like SET inMessage= CAST(InputRoot.XML AS BLOB CCSID 1208);
For < and > like Set gt = CAST('>' AS BLOB CCSID 1208).
note: inMessage, gt & lt should be declare as BLOB
Then replace(inMessage,'<','<')
I am not sure about the correct syntax, please check that.
And I am not sure in XML why you want to use < and >, they are poison for XML. |
|
Back to top |
|
 |
Herbert |
Posted: Fri Sep 24, 2010 4:33 am Post subject: Re: Replacing <and > in esql |
|
|
 Centurion
Joined: 05 Dec 2006 Posts: 146 Location: Leersum, The Netherlands
|
vijayakumar wrote: |
set OutputRoot.XMLNS.PayloadAttribute.Messages.messageData =
replace(OutputRoot.XMLNS.PayloadAttribute.Messages.messageData,'<','<');
But it s not replacing the < with < .
|
Maybe it works only temporary in memory, but when OutputRoot.XMLNS elements are written out it must replace < with < (in normal XML elements values)
May I suggest you Google for CDATA? It could be a solution for your problem.
hgj |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|