[Servingxml-help] grouping of non-consecutive records
Brought to you by:
danielaparker
|
From: Sandhya <sa...@la...> - 2007-04-10 00:12:23
|
Hi,
In the below file, there are 4 trade rows followed by 4 settlement rows.
I want to group them by their id which is the second field. The expected
outout is below. groupBy groups consecutive records. Can we group
non-consecutive records?
TRDE,1,25,25000,.......
TRDE,2,35,35000,.......
TRDE,3,45,45000,.......
TRDE,4,55,55000,.......
STLM,1,25,25001,.......
STLM,2,35,35001,.......
STLM,3,45,45001,.......
STLM,4,55,55001,.......
<transactions>
<transaction id = 1>
<trade>
<qty>25</qty>
<amt>25000</amt>
<trade>
<settlement>
<qty>25</qty>
<amt>25001</amt>
</settlement>
</transaction>
<transaction id = 2>
<trade>
<qty>35</qty>
<amt>35000</amt>
<trade>
<settlement>
<qty>35</qty>
<amt>35001</amt>
</settlement>
</transaction>
</transactions>
|