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 » How to hide delimiter for optional elements?

Post new topic  Reply to topic
 How to hide delimiter for optional elements? « View previous topic :: View next topic » 
Author Message
cadenza
PostPosted: Tue Jun 01, 2004 4:25 am    Post subject: How to hide delimiter for optional elements? Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 48

Dear All,

Im a newbie and Im using WMQI 2.1 Control Center.

I am transforming data from XML to TDS (Pipe Delimited) format.

For input sample:

<Book>
<Title>The Adventures of Tom Sawyer</Title>
<Publisher></Publisher>
<Author>Mark Twain</Author>
</Book>

I get the output value:

The Adventures of Tom Sawyer||Mark Twain


But my desired output is:

The Adventures of Tom Sawyer|Mark Twain

That is the delimiter for optional element Publisher should not come in output, if it does not contain a value.

Is it possible?

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 01, 2004 5:20 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

There's a very good reason why WMQI outputs delimiters for missing elements. If it did not, it would be very difficult, or even impossible, for the next application to parse the message.
So, how will the next application parse this message...

Quote:
The Adventures of Tom Sawyer||Mark Twain


Presumably, you will expect Title and Author, with Publisher missing. But the most likely result is that you will get Title and Publisher (set to 'Mark Twain'), with Author missing.

So unless the receiving application is a very smart parser, you should think again.
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 » How to hide delimiter for optional elements?
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.