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 » XMl to XML transformation advice pls

Post new topic  Reply to topic
 XMl to XML transformation advice pls « View previous topic :: View next topic » 
Author Message
raj12121
PostPosted: Thu May 01, 2014 8:02 pm    Post subject: XMl to XML transformation advice pls Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Thu May 01, 2014 10:46 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.

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
View user's profile Send private message
Vitor
PostPosted: Fri May 02, 2014 4:27 am    Post subject: Re: XMl to XML transformation advice pls Reply with quote

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
View user's profile Send private message
sandman147
PostPosted: Fri May 02, 2014 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri May 02, 2014 6:46 am    Post subject: Reply with quote

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
View user's profile Send private message
mqsiuser
PostPosted: Fri May 02, 2014 7:48 am    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

I'd use ESQL and References
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
raj12121
PostPosted: Sun May 04, 2014 6:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun May 04, 2014 10:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
raj12121
PostPosted: Sun May 04, 2014 11:24 pm    Post subject: Reply with quote

Newbie

Joined: 09 Mar 2011
Posts: 8

Thanks ,

I am using IIB.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon May 05, 2014 2:45 pm    Post subject: Reply with quote

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
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 » XMl to XML transformation advice pls
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.