|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating Output Tree Dynamically |
« View previous topic :: View next topic » |
Author |
Message
|
rgajawada |
Posted: Thu Sep 02, 2004 4:07 pm Post subject: Creating Output Tree Dynamically |
|
|
Novice
Joined: 08 Sep 2003 Posts: 10
|
I am trying to append common header elements to all the incoming messages(all in xml). basically a subflow.
All the incoming messages have a Header record and mulitple Detail record. now I need append some common Header elements which woud be in all the messages. before it proceeds to the next node.
so, how do I create a output tree, I mean how shud I create a root element based on the input message.
ex:
<message1>
<header>
<element1>
<element2>
<detail1>
</detail1>
<detail2>
</detail2>
</header>
</message1>
<message2>
<header>
<element1>
<element2>
<detail1>
</detail1>
<detail2>
</detail2>
</header>
</message2>
in my subflow I wud take the option of inputroot = ouputroot but how shud I add the elements. like the root element varies, message1 , message2 and so..on
thank u for any thoughts and suggestions.
rg |
|
Back to top |
|
 |
kirani |
Posted: Thu Sep 02, 2004 5:35 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Can you post a sample of output message? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rgajawada |
Posted: Thu Sep 02, 2004 6:32 pm Post subject: |
|
|
Novice
Joined: 08 Sep 2003 Posts: 10
|
if the input message is message1
<message1>
<header>
<element1>
<element2>
<detail1>
</detail1>
<detail2>
</detail2>
</header>
</message1>
then the output I require is...
<message1>
<header>
<element1>
<element2>
<commonelement1>
<commonelement2>
<detail1>
</detail1>
<detail2>
</detail2>
</header>
</message1>
in case the input message message2 then output I require is...
<message2>
<header>
<element1>
<element2>
<commonelement1>
<commonelement2>
<detail1>
</detail1>
<detail2>
</detail2>
</header>
</message2>
the reason, I'm unable to post my acutal input and output.....since I'm yet to start design and develop.
thanku
rg |
|
Back to top |
|
 |
kirani |
Posted: Fri Sep 03, 2004 10:47 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Please note that this code is untested.
Code: |
CREATE NEXTSIBLING OF OutputRoot.XML.*[1].*[1].*[2] NAME 'Mycommonvalue1';
CREATE NEXTSIBLING OF OutputRoot.XML.*[1].*[1].*[3] NAME 'Mycommonvalue2';
|
You can do something like this. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|