i have sample xelement:
<Books>
<Book>
<Id>123</Id>
<EndDate>01/11/2009</EndDate>
<Price>$0.00</Price>
<tag1>0</tag1>
<tag2>0</tag2>
</Book>
<Book>
<Id>567</Id>
<EndDate>01/01/2001</EndDate>
<Price>$0.00</Price>
<tag1>1</tag1>
<tag2>2</tag2>
</Book>
<Book>
<Id>567</Id>
<EndDate>01/01/2001</EndDate>
<tag1>22</tag1>
<tag2>33</tag2>
<Price>$0.00</Price>
</Book>
</Books>
I have to merge 2 nodes ( with coma seperated) when enddates are same . for the above input i shoud get fallowing out put .
<Books>
<Book>
<Id>123</Id>
<EndDate>01/11/2009</EndDate>
<Price>$0.00</Price>
<tag1>0</tag1>
<tag2>0</tag2>
</Book>
<Book>
<Id>567</Id>
<EndDate>01/01/2001</EndDate>
<Price>$0.00</Price>
<tag1>1,22</tag1>
<tag2>2,33</tag2>
</Book>
</Books>
I tried using agrigate funtion but how am not able to add end date condition can any boday help