Read about the Muenchian grouping method -- essentially you need to
determine all <Typeelements with different values and from this node-set
then generate the new xml document -- this is so easy and straightforward.
http://www.jenitennison.com/xslt/grouping/muenchian.xml
Cheers,
Dimitre Novatchev.
"Guhanath" <Guhanath@discussions.microsoft.comwrote in message
news:764D8BC8-AD5A-4061-A068-F43943E83F7A@microsoft.com...
Quote:
Hi,
>
Please suggest a solution for the following problem.
>
We get a input xml that need to be processed for grouping and sorting.
The example of one such xml
>
<Requests>
<Request>
......
<Results>
<Result1>
<Type>1</Type>
</Result>
<Result1>
<Type>2</Type>
</Result>
</Results>
</Request>
>
</Requests>
>
To obtain some sorting and grouping kind of thing we need to split this
xml
as follwoing
>
<RequestsNew --Xml Node Name changed
<Request>
......
<Results>
<Result1>
<Type>1</Type>
</Result>
</Results>
</Request>
>
<Request>
......
<Results>
<Result1>
<Type>2</Type>
</Result>
</Results>
</Request>
</Requests>
>
If the type is different we need to make them as seperate requests,if the
<typeis same we need to maintain the original xml structure.
>
Please tell me a solution for this.
>
>
--
Guhan
|