|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Tagged Delimited problems |
« View previous topic :: View next topic » |
Author |
Message
|
hampe98 |
Posted: Tue Aug 29, 2006 6:04 am Post subject: |
|
|
Novice
Joined: 28 Aug 2006 Posts: 10
|
One thing I don´t really get is what you should match with the data pattern?
Should you just match the key or should you match the entire complex datatype/group?
I´v got a message like this:
{message_header={message_type=data}atag=avalue|entries={entry1={atag=avalue| anothertag=anothervalue}entry2...
If I want to extract the entry1 complextype with use of a data pattern should I match entry1 or should I match the entire entry1={...}?
Anyone got a clue?
Regards,
Hampus |
|
Back to top |
|
 |
kimbert |
Posted: Tue Aug 29, 2006 2:49 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
If I want to extract the entry1 complextype with use of a data pattern should I match entry1 or should I match the entire entry1={...}? |
If you really want to extract the entire contents of the complex type, then you should definitely ensure that the data pattern describes all of its content. It's often tricky to get the data pattern correct, by the way.
Are you sure that you want to match the entire structure? There is a modeling technique which allows you to use a data pattern to match the first few characters in a structure, but avoids having to match all of the structure. If you're interested I can give more details. |
|
Back to top |
|
 |
hampe98 |
Posted: Tue Aug 29, 2006 11:31 pm Post subject: |
|
|
Novice
Joined: 28 Aug 2006 Posts: 10
|
Yes, I´m interested. Thats exactly what I want do do. I would like to extract the key (like entry1...entry(n)) and then model the structure tagged delimited if possible. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 31, 2006 6:10 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I found a way to model this without using a data pattern:
GI means 'Group Indicator' and GT means 'Group Terminator'
Code: |
element Name='entries' type=entriesType tag='entries'
entriesType DES=TaggedDelimited GI='{' GT='}' LengthOfTag = 5
element Name=entry Type=entryType tag='entry'
entryType DES=TaggedDelimited LengthOfTag=0
sequence DES=AllElementsDelimited GT='=' Delimiter='='
entryNumber type='string'
sequence DES=TaggedDelimited GI='{' GT='}' Delimiter='|' TagDataSeparator='='
element Name='atag' tag='atag'
element Name='anothertag' tag='anothertag'
|
I've tried this on your example and it works for me. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 08, 2006 1:42 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
|
|
|
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
|
|
|
|