|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to hide delimiter for optional elements? |
« View previous topic :: View next topic » |
Author |
Message
|
cadenza |
Posted: Tue Jun 01, 2004 4:25 am Post subject: How to hide delimiter for optional elements? |
|
|
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 |
|
 |
kimbert |
Posted: Tue Jun 01, 2004 5:20 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|