Author |
Message
|
sweety176 |
Posted: Mon Aug 29, 2005 6:10 am Post subject: XML transformation |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
I have to transform XML input coming from one Q1 to XML o/p used by Q2. Then convert the response XML from Q2 to XML of Q1. I have to write a code mapping input attributes to o/p attributes. I know how to do it one way ie from Q1 to Q2. Could anyone please help me how to accomodate for the response XML from Q2 and convert it to Q1XML in the same code.
Regards
Sweety |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 29, 2005 8:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It should be the same method to map from Q2 to Q1 as it is from Q1 to Q2.
Presumably, the fields will be on different sides. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sweety176 |
Posted: Mon Aug 29, 2005 10:11 am Post subject: Detailed Problem |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
Thats OK but the condition is such that,,i need to compare the headers and if the header is say X then I have to map according to Doc1 and if header is Y i have to map according to doc2.So how do I do that.Can i use a if-else statement or is there any better way. Sorry to be bothering with simple questions but I am new to MQSI so I am really confused.
Regards
Sweety |
|
Back to top |
|
 |
wschutz |
Posted: Mon Aug 29, 2005 10:19 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
In that case, I would use a filter node and then route the message to the correct "mapping" node (however you do that mapping, esql, real mapping node, xml node...) _________________ -wayne |
|
Back to top |
|
 |
JT |
Posted: Mon Aug 29, 2005 11:06 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
You could also use RouteToLabel/Label nodes. |
|
Back to top |
|
 |
sweety176 |
Posted: Mon Aug 29, 2005 11:42 am Post subject: Solved |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Thanks a lot for all your replies.
I will go with a Filter node and see if it works.
One last question, will it make any difference if I use a filter node or a RoutetoLabel/Label node?
Regards
Sweety |
|
Back to top |
|
 |
wschutz |
Posted: Mon Aug 29, 2005 11:47 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
If its strictly a binary decision, the filter node is easier. If you need to branch to more than two mapping nodes, then routetolabel makes more sense (at least to me....) _________________ -wayne |
|
Back to top |
|
 |
JT |
Posted: Mon Aug 29, 2005 12:00 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Wayne, you're correct.
Quote: |
You might find that using a RouteToLabel node with a set of Label nodes provides a better alternative to a sequence of Filter nodes. Each message passes through a smaller number of nodes, improving throughput. However, you must also consider using a RouteToLabel node means using a Compute node: the overhead of this node might outweigh the advantages. If you are dealing with a limited number of message types, a small number of Filter nodes is more efficient. |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 30, 2005 4:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I seem to remember Tim Dunn or someone else saying that a nesting of about three filter nodes was the break even point for using RouteToLabel instead. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|