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 » Strip Whitespace when going from MRM to XML

Post new topic  Reply to topic
 Strip Whitespace when going from MRM to XML « View previous topic :: View next topic » 
Author Message
sorn73
PostPosted: Thu Apr 08, 2004 5:04 am    Post subject: Strip Whitespace when going from MRM to XML Reply with quote

Novice

Joined: 24 Mar 2004
Posts: 24
Location: Sweden

I have a fixed length field message in an MRM tree that I more or less copy into an XML tree (not quite
Code:
SET OutputRoot.XML.Root = InputBody
but almost). However, in the incoming message all fields are padded with space. How can I efficiently remove the whitespace padding from the entire XML tree? Can I do it on the MRM side using the parser, with some flag in the message set? Can I do it using a SELECT instead of my SET?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 08, 2004 5:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You could
Code:
Set OutputRoot.XML.Field1 = TRIM(InputBody.Field1);

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sorn73
PostPosted: Thu Apr 08, 2004 5:38 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2004
Posts: 24
Location: Sweden

Yes, but TRIM only works on STRINGS and not on entire subtrees... right? And I don't know the exact layout of the XML structure, with repeating elements etc.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 08, 2004 5:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There was code posted here quite a while ago to loop through an XML tree using references, and apply TRIM to every element.

Try searching for something like 'XML TRIM reference'.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjcarretero
PostPosted: Thu Apr 08, 2004 6:13 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Hi,

When the broker parses the MRM message, you can try to set the padding char of every field to 'SPACE'. When parsing a message, the padding char is used as the character to trim.

Hope this helps.

Regards
Felipe
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Strip Whitespace when going from MRM to XML
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.