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 » ESQL problem with xml flows

Post new topic  Reply to topic
 ESQL problem with xml flows « View previous topic :: View next topic » 
Author Message
Galichet
PostPosted: Thu Sep 15, 2005 1:28 am    Post subject: ESQL problem with xml flows Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 69
Location: Paris - France

Hi all

I'm looking for a way to copy a sub-bloc in an xml flow into my output xml message knowing that this sub-bloc name can be different for each message but it is always after the tag <Key>.

example :

Input 1
<Flow>
<Key>test</Key>
<AnyName>
<Tag1>hello</Tag1>
<Tag2>world</Tag2>
</AnyName>
</Flow>

Input 2
<Flow>
<Key>test</Key>
<AnyName2>
<Tag1>very</Tag1>
<Tag2>cool</Tag2>
<Tag3>stuff</Tag3>
</AnyName2>
</Flow>

Output 1 expected
<FlowResult>
<Result>
<AnyName>
<Tag1>hello</Tag1>
<Tag2>world</Tag2>
</AnyName>
</Result>
</FlowResult>

Output 2 expected
<FlowResult>
<Result>
<AnyName2>
<Tag1>very</Tag1>
<Tag2>cool</Tag2>
<Tag3>stuff</Tag3>
</AnyName2>
</Result>
</FlowResult>


Maybe I could use reference fields ? But I haven't found something working (I'm not used with them). The important for me is to have a generic code.

If someone can help me

Thanks
_________________
Eric Galichet
SMABTP
France
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Thu Sep 15, 2005 2:04 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
try this (untested)
Code:
DECLARE Ref REFERENCE TO InputRoot.XML.Flow.Key;
MOVE Ref NEXTSIBLING;

CREATE FIRSTCHILD OF OutputRoot.XML.FlowResult.Result FROM Ref;

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL problem with xml flows
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.