Posted: Tue Sep 07, 2004 3:27 am Post subject: Sorting of XML elements based on Date.
Voyager
Joined: 01 May 2004 Posts: 96
I have a XML doc like this
<root>
<Tag>
<startDate>2004-08-09T00:00:00</startDate>
<Tag>
<Tag>
<startDate>2004-07-08T00:00:00</startDate>
<Tag>
<Tag>
<startDate>2004-06-08T00:00:00</startDate>
<Tag>
</root>
Tag can accur many times
Now I want to split this message as .
Message1:
<root>
<Tag>
<startDate>2004-06-08T00:00:00</startDate>
<Tag>
</root>
Please note that the order of the message split is based on the startDate. Is it possible to do this using Select ? or do we need to sort this manually.
Is it advisible to use the column function MIN or MAX to select the minimum or maximum startDate from XML . The time format is like this
2004-10-04T00:00:00.
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
Why do you care what order the messages get put out in? You can build a fairly simple select and loop to accomplish what you need, if the order is just whatever is in the XML. _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
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