|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS delimiter question? |
« View previous topic :: View next topic » |
Author |
Message
|
TonyD |
Posted: Wed Oct 21, 2009 4:47 pm Post subject: TDS delimiter question? |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
I have a tagged message format in which the tag is preceded with '&', as in:
&Product=AAA&Type=BBB&Price=CCC&Quantity=DDD
As far as I know TDS does not support a 'pre-limiter'. I have therefore defined the format as 'tagged/delimited', with '&' as the delimiter, with the tag for the first field as '&Product' and allowing an absent delimiter at the end of the type.
This seems to work OK. However I was wondering if there was any other way I could have defined this structure? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 21, 2009 4:52 pm Post subject: Re: TDS delimiter question? |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
TonyD wrote: |
IAs far as I know TDS does not support a 'pre-limiter'. |
Not by such a name, no.
TonyD wrote: |
I have therefore defined the format as 'tagged/delimited', with '&' as the delimiter, with the tag for the first field as '&Product' and allowing an absent delimiter at the end of the type. |
Okay. That's clearly a workable option.
TonyD wrote: |
This seems to work OK. However I was wondering if there was any other way I could have defined this structure? |
I might have gone with a Group Indicator, myself.
But I really don't have a clear picture of your model. So I might have just gone with ensuring that every tag includes the &. |
|
Back to top |
|
 |
TonyD |
Posted: Wed Oct 21, 2009 5:23 pm Post subject: Re: TDS delimiter question? |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
mqjeff wrote: |
I might have gone with a Group Indicator, myself. |
Would this mean that each of the three elements in the example would have to be defined as a type?
mqjeff wrote: |
But I really don't have a clear picture of your model. So I might have just gone with ensuring that every tag includes the &. |
I tried that, with no delimiter specified. It appeared to work for TDS, but did not map correctly from TDS to XML. It treated everything after '&Product=' as the value of that element, e.g.:
<Product='AAA&Type=BBB&Price=CCC&Quantity=DDD'> |
|
Back to top |
|
 |
kimbert |
Posted: Thu Oct 22, 2009 2:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
What you've done is fine. & really is the delimiter - it just happens to occur before the first member of the structure as well as in between the other members. The technical description would be '& is a prefix delimiter'.
Personally, I would have put & as the Group Indicator on the outer type, so that the tag for Product is consistent with the tags for Type and Quantity.
Quote: |
and allowing an absent delimiter at the end of the type. |
No need for that in your case ( although it's harmless). In TDS, delimiters are 'infix' ( occur between type/group members). That setting controls whether you are allowed to omit the delimiters for omitted trailing members of the type/group. |
|
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
|
|
|
|