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 SELECT problem

Post new topic  Reply to topic
 XML SELECT problem « View previous topic :: View next topic » 
Author Message
aks
PostPosted: Sun Feb 06, 2005 10:15 pm    Post subject: XML SELECT problem Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

I need help with a SELECT statement or alternate method of processing the following XML example:

Code:
<Parent>
<LIB><Id>2</Id></LIB>
<FIR><Id>1</Id></FIR>
<MNY><Id>2</Id></MNY>
<BIF><Id>1</Id></BIF>
<BRG><Id>1</Id></BRG>
<MNY><Id>1</Id></MNY>
<FIR><Id>3</Id></FIR>
<FIR><Id>2</Id></FIR>
<LIB><Id>1</Id></LIB>
<BIF><Id>2</Id></BIF>
<GLS><Id>1</Id></GLS>
<BRG><Id>2</Id></BRG>
<GLS><Id>2</Id></GLS>
</Parent>


Basically the schema for this XML is a choice between any one of the elements but with multiple instances of the choice allowed.

I need to convert the contents of the elements to copybook format and the order is critical. That is, I have to output the child content of the FIR, then BIF, then LIB, then BRG then GLS elements with the same Id, as well as in ascending Id order. However, as you can see from the sample, the elements can come down in any order, with higher Id values possibly appearing first. The desired output would be:

Code:
<Parent>
<FIR><Id>1</Id></FIR>
<BIF><Id>1</Id></BIF>
<LIB><Id>1</Id></LIB>
<BRG><Id>1</Id></BRG>
<MNY><Id>1</Id></MNY>
<GLS><Id>1</Id></GLS>
<FIR><Id>2</Id></FIR>
<BIF><Id>2</Id></BIF>
<LIB><Id>2</Id></LIB>
<BRG><Id>2</Id></BRG>
<MNY><Id>2</Id></MNY>
<GLS><Id>2</Id></GLS>
<FIR><Id>3</Id></FIR>
</Parent>


Any suggestions would be most welcomed
Thanks
Alan
Quote:
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 SELECT problem
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.