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 Sorting

Post new topic  Reply to topic
 XML Sorting « View previous topic :: View next topic » 
Author Message
ANorm
PostPosted: Thu May 22, 2008 7:18 pm    Post subject: XML Sorting Reply with quote

Newbie

Joined: 15 May 2003
Posts: 7

Task:
Sort XML message (multiple records) by CustomerName then output XML message by CustomerName & TotalValue.

Eg,

Input message (multiple records):
<?xml version="1.0" encoding="ISO-8859-1" ?>
<order>
<column name="Customer">
<record id="1">
<data name="CustomerName">Mark</data>
<data name="ItemNumber">A1108</data>
<data name="TotalValue">100</data>
</record>
<record id="2">
<data name="CustomerName">Mark</data>
<data name="ItemNumber">A1108</data>
<data name="TotalValue">150</data>
</record>
<record id="3">
<data name="CustomerName">Adam</data>
<data name="ItemNumber">A1109</data>
<data name="TotalValue">200</data>
</record>
</column>
</order>

The expected xml output message should look for customerName and then add the TotalValue of the same customer :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<order>
<column name="Customer">
<record id="1">
<data name="CustomerName">Mark</data>
<data name="ItemNumber">A1108</data>
<data name="TotalValue">250</data>
</record>
<record id="2">
<data name="CustomerName">Adam</data>
<data name="ItemNumber">A1109</data>
<data name="TotalValue">200</data>
</record>
</column>
</order>

Please enlighten.

Thank you and best regards.
Back to top
View user's profile Send private message
broker_new
PostPosted: Thu May 22, 2008 7:56 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

In ESQL there is no Sort built in function.
We implemented the Insertion Sort algorithm to do the sorting.
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
goffinf
PostPosted: Thu May 22, 2008 11:53 pm    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Use an XSLT transformation.

Fraser.
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 Sorting
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.