Here pl confirm the 2 things..
1) Do you want only the attribute "ID" to be compared or
2) Once ID is compared, you wanted to add the "Items" attribute and remove
the extra element in the resulted doc....
Correct me if i'm mistaken ..
--
Every thing is perfect, as long as you share!!!
[quoted text, click to view] "Garikayi Mukombachoto" wrote:
> Hi
>
> I would really appreciate any assistanance with the following situation.
>
> Lets say i have 2+ documents A,B,...n that i need to merge together, such
> that the resulting documents contains totals or sum of the common elements.
>
> For example:
>
> Doc A
>
> <employees>
> <emp ID="1" Items="20">emp 1 name</emp>
> <emp ID="2" Items="15">emp 2 name</emp>
> <emp ID="3" Items="5">emp 3 name</emp>
> </employees>
>
> Doc B
> <employees>
> <emp ID="1" Items="15">emp 1 name</emp>
> <emp ID="2" Items="5">emp 2 name</emp>
> <emp ID="5" Items="55">emp 5 name</emp>
> </employees>
>
> Doc A + Doc B
> <employees>
> <emp ID="1" Items="35">emp 1 name</emp>
> <emp ID="2" Items="20">emp 2 name</emp>
> <emp ID="3" Items="5">emp 3 name</emp>
> <emp ID="3" Items="55">emp 3 name</emp>
> </employees>
>
> How may i best go about this?, considering perfomance as well.
>
> Thank you in advance.
>
>
I want to compare the id and add the attributes. the resultant document
should contain names from both documents. Nothing is to be removed.
[quoted text, click to view] "Chakravarthy" <dskcheck@india.com> wrote in message
news:2A56FD24-2935-4E6C-8601-23B0284F68C5@microsoft.com...
> Here pl confirm the 2 things..
> 1) Do you want only the attribute "ID" to be compared or
> 2) Once ID is compared, you wanted to add the "Items" attribute and remove
> the extra element in the resulted doc....
>
> Correct me if i'm mistaken ..
>
> --
> Every thing is perfect, as long as you share!!!
>
>
> "Garikayi Mukombachoto" wrote:
>
>> Hi
>>
>> I would really appreciate any assistanance with the following situation.
>>
>> Lets say i have 2+ documents A,B,...n that i need to merge together, such
>> that the resulting documents contains totals or sum of the common
>> elements.
>>
>> For example:
>>
>> Doc A
>>
>> <employees>
>> <emp ID="1" Items="20">emp 1 name</emp>
>> <emp ID="2" Items="15">emp 2 name</emp>
>> <emp ID="3" Items="5">emp 3 name</emp>
>> </employees>
>>
>> Doc B
>> <employees>
>> <emp ID="1" Items="15">emp 1 name</emp>
>> <emp ID="2" Items="5">emp 2 name</emp>
>> <emp ID="5" Items="55">emp 5 name</emp>
>> </employees>
>>
>> Doc A + Doc B
>> <employees>
>> <emp ID="1" Items="35">emp 1 name</emp>
>> <emp ID="2" Items="20">emp 2 name</emp>
>> <emp ID="3" Items="5">emp 3 name</emp>
>> <emp ID="3" Items="55">emp 3 name</emp>
>> </employees>
>>
>> How may i best go about this?, considering perfomance as well.
>>
>> Thank you in advance.
>>
>>
>>