ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Replacing <and > in esql

Post new topic  Reply to topic
 Replacing <and > in esql « View previous topic :: View next topic » 
Author Message
vijayakumar
PostPosted: Fri Sep 24, 2010 1:53 am    Post subject: Replacing <and > in esql Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

In my esql , i want to replace &lt; with < and &gt; 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,'&lt;','<');

But it s not replacing the &lt with < .

May i know we cant try like this . Please someone suggest .
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Sep 24, 2010 4:04 am    Post subject: Re: Replacing &lt;and &gt; in esql Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vijayakumar wrote:
In my esql , i want to replace &lt; with < and &gt; 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
View user's profile Send private message
ajit1981
PostPosted: Fri Sep 24, 2010 4:26 am    Post subject: Reply with quote

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,'&lt;','<')

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
View user's profile Send private message
Herbert
PostPosted: Fri Sep 24, 2010 4:33 am    Post subject: Re: Replacing &lt;and &gt; in esql Reply with quote

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,'&lt;','<');

But it s not replacing the &lt with < .


Maybe it works only temporary in memory, but when OutputRoot.XMLNS elements are written out it must replace < with &lt; (in normal XML elements values)

May I suggest you Google for CDATA? It could be a solution for your problem.

hgj
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Replacing &lt;and &gt; in esql
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.