Author |
Message
|
raj12121 |
Posted: Thu May 01, 2014 8:02 pm Post subject: XMl to XML transformation advice pls |
|
|
Newbie
Joined: 09 Mar 2011 Posts: 8
|
Hi All,
I have a requirement to generate a xml from an input xml.
> Input xml has around 400 elements
> Output xml is a subset of input xml (approx 200 elements)
> Some of the output xml elements are exactly same as input. Its direct copy.
>Some output xml field data are result of simple string manipulation of input xml field data
Appreciate your input. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu May 01, 2014 10:46 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
How do you think it should be done?
What options have you considered? _________________ 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 |
|
 |
Vitor |
Posted: Fri May 02, 2014 4:27 am Post subject: Re: XMl to XML transformation advice pls |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
raj12121 wrote: |
Appreciate your input. |
You should probably develop a flow that does this.
Seriously. What other advice or input were you expecting? This is a "how to use WMB" question - it's too broad to answer.
You want to transform one message format to another. That's what all of the transformation tooling in WMB is built to do. You can use any of it. Which is best for your case cannot be determined from the information you've given. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sandman147 |
Posted: Fri May 02, 2014 6:26 am Post subject: |
|
|
Apprentice
Joined: 01 Sep 2013 Posts: 42
|
Example:
Input XML
<Field>
<Field1>
<Field1a>xyz</Field1a>
<Field1b>abc</Field1b>
</Field1>
<Field2>
</Field2>
</Field>
Output XML
<Tag>
<Tag1>xyz</Tag1>
<Tag2>abcdef</Tag2>
</Tag>
Message Flow
MQ Input -> Compute -> MQ Output
MQ Input Property : Message Domain: XMLNSC
Compute Node:
SET OutputRoot.XMLNSC.Tag.Tag1 = InputRoot.XMLNSC.Field.Field1.Field1a;
SET OutputRoot.XMLNSC.Tag.Tag2 = InputRoot.XMLNSC.Field.Field1.Field1b||'def'; |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 02, 2014 6:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Unless the OP has IIBv9 where the Mapping node could do what the OP describes.
Unless the OP has deep Java skills and doesn't want to learn ESQL.
Unless the OP has an existing XSLT to leverage.
etc
etc
etc _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqsiuser |
Posted: Fri May 02, 2014 7:48 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
I'd use ESQL and References _________________ Just use REFERENCEs |
|
Back to top |
|
 |
raj12121 |
Posted: Sun May 04, 2014 6:16 pm Post subject: |
|
|
Newbie
Joined: 09 Mar 2011 Posts: 8
|
Thank you all,
I have thought about using ESQL and mapping elements manually. Other option is to use graphical mapper. ESQL will be lot faster in processing.
What I am wondering, is it a good practice to code in ESQL when you have large number of filed mapping ? This would be maintenance nightmare ?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun May 04, 2014 10:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
raj12121 wrote: |
Thank you all,
I have thought about using ESQL and mapping elements manually. Other option is to use graphical mapper. ESQL will be lot faster in processing.
What I am wondering, is it a good practice to code in ESQL when you have large number of filed mapping ? This would be maintenance nightmare ?
Thanks |
Assuming IIB (facts not in evidence)
ESQL and java are about just as fast and the mapping node is close too.
The question really comes down to: Do you need to push performance to the last millisecond? If the answer to that question is no (variation of 200 ms is acceptable) then you should be able to code either or any of them.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
raj12121 |
Posted: Sun May 04, 2014 11:24 pm Post subject: |
|
|
Newbie
Joined: 09 Mar 2011 Posts: 8
|
|
Back to top |
|
 |
kimbert |
Posted: Mon May 05, 2014 2:45 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Use the transformation language that best suits your site requirements.
And in future, please take more time to explain your question - this has been a bit of a time-waster because nobody understood what you wanted to know. _________________ 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 |
|
 |
|