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 » Creating dynamic tags in MB

Post new topic  Reply to topic
 Creating dynamic tags in MB « View previous topic :: View next topic » 
Author Message
dextermbmq
PostPosted: Sat Jul 26, 2014 12:20 pm    Post subject: Creating dynamic tags in MB Reply with quote

Voyager

Joined: 26 Jul 2014
Posts: 77

Hi All,

I am trying to create a output xml message based on the records stored in DB. For example :

if the records are like :

RULE_ID TYPE
101 ABC
101 XYZ
101 PQR
102 MNO

I want to have the output xml message like :

<Detail>
<Rule1>101</Rule1>
<Rule2>101</Rule2>
<Rule3>101</Rule3>
<Rule4>102</Rule4>
</Detail>

i.e. I wan to have DYNAMIC CREATION OF TAGS.

I am not able to figure out possible ways to do it.

Any help would be appreciated.

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sun Jul 27, 2014 10:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The output XML format is badly designed. The number appended to the tag names is conveying no information at all ( unless you have forgotten to tell us something ).
If you have any control at all over the receiving application then I suggest that you get the numbers removed from the tag names.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
ganesh
PostPosted: Mon Jul 28, 2014 10:04 am    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

Quote:
I wan to have DYNAMIC CREATION OF TAGS.


Use curly braces "{".
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jul 28, 2014 10:34 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.

ganesh wrote:
Quote:
I wan to have DYNAMIC CREATION OF TAGS.


Use curly braces "{".


While that might actually solve the problem, it does not address the issue pointed out by Kimbert.

If there are a variable number of <Rule'n'> tags, how will the receiver of that data know how to iterate through them? Not all systems have clever things like references in ESQL that make it easy to go through a structure like the one proposed AND get the FIELDNAME each time.

It is a case of tryling to look at the bigger picture.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating dynamic tags in MB
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.