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 » Parsing XML with CDATA characters

Post new topic  Reply to topic
 Parsing XML with CDATA characters « View previous topic :: View next topic » 
Author Message
lillo
PostPosted: Fri Jul 12, 2002 4:23 am    Post subject: Parsing XML with CDATA characters Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Hi,

A have an XML coming to my MQInput node and i need to remove from the message all the cdata characters, such as tab, CR, space, which are between tags.

As there any easy way to do it?

Thanks,
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
Back to top
View user's profile Send private message
nico_fr
PostPosted: Fri Jul 12, 2002 6:12 am    Post subject: Parse string in hexadecimal Reply with quote

Newbie

Joined: 29 May 2002
Posts: 2
Location: France

You can move your string in a blob and make a loop to parse each carracter in HEX and contruct a blob without your specials chars.
A last you cast your blob variable into string.

Sample (not tested):

DECLARE A INTEGER
DECLARE TEMP BLOB;
DECLARE NEW_TEMP BLOB;
DECLARE OLD_TEMP BLOB;
SET A = 1;
SET OLD_TEMP=CAST(Input AS BLOB);
SET NEW_TEMP='';
WHILE A <= LENGTH(TEMP) DO
SET TEMP=UPPER(SUBSTRING(OLD_TEMP from A for 2));
-- The ASCII CODE of the char that you want to remove
IF TEMP ='09' THEN
SET NEW_TEMP=NEW_TEMP||'40';
ELSE
SET NEW_TEMP=NEW_TEMP||TEMP;
END IF;
SET A=A+2;
END WHILE;
SET RESULT=CAST(NEW_TEMP AS CHAR);

Good Luck.

Nicolas JAILLARD
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing XML with CDATA characters
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.