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 » Problem parsing TDS

Post new topic  Reply to topic
 Problem parsing TDS « View previous topic :: View next topic » 
Author Message
w
PostPosted: Mon Nov 22, 2010 3:21 am    Post subject: Problem parsing TDS Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

I need to parse TDS message. The structure of the message is as follows
Record:FirstName=Mark|LastName=Campese
Record:FirstName=Mark1|LastName=Campese1


i need to parse it to XML to look something like this
<root>
<rec>
<FirstName>Mark<\FirstName>
<LastName>Campese<\LastName>
<\rec>
<rec>
<FirstName>Mark1<\FirstName>
<LastName>Campese1<\LastName>
<\rec>
<\root>


plz help
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Nov 22, 2010 4:01 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you read the tutorial on TDS messages that is referenced at the top of this forum?
That should be your first port of call.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
w
PostPosted: Mon Nov 22, 2010 4:28 am    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

Sorry everyone was making a very basic mistake.Got it. its working now.The tutorial is really helpful.
Back to top
View user's profile Send private message
nukalas2010
PostPosted: Mon Nov 22, 2010 8:33 pm    Post subject: Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

Hi W,

Can you please tell me how u got that output message plzzz...

thanks in advance
Back to top
View user's profile Send private message
w
PostPosted: Mon Nov 22, 2010 10:07 pm    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

Hi nuklas,
I used the following settings
complex type element - root <tdsStructRep dataElementSeparation="TaggedDelimited" delimiter="<CR><LF>" groupIndicator="" groupTerminator="" messageSetDefaultRep="Text1" observeElementLength="false" suppressAbsentElementDelimiters="EndOfType" tagDataSeparator=":"


complex type element - rec <tdsStructRep dataElementSeparation="TaggedDelimited" delimiter="|" groupIndicator="" groupTerminator="" messageSetDefaultRep="Text1" tagDataSeparator="="/>


and the tags for elements are as follows

rec-record
FirstName-FirstName
LastName-LastName


hope this will make u understand
Plzzz do read the tutorial suggested by smdavies99.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 23, 2010 2:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Interesting.

I might have used "Record:" as the Group Indicator, and done away with the outer type.

But that might not have worked with the rest of the message... And there's nothing wrong with your solution.
Back to top
View user's profile Send private message
nukalas2010
PostPosted: Tue Nov 23, 2010 7:22 pm    Post subject: Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

Quote:

Plzzz do read the tutorial suggested by smdavies99.


Sorry I didnt find any tutorial, If u dnt mind can u please send me dat link

thanks..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Nov 23, 2010 10:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

This is one of the 'sticky' posts at the top of the forum posting list.

There are two such posts.
One announcing the patterns forum and the other a TDS Tutorial.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
nukalas2010
PostPosted: Tue Nov 23, 2010 11:08 pm    Post subject: Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

yeah Thankuuu Davies...

Its a very nice tutorial by marten ...
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 » Problem parsing TDS
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.