Please consider this XML:
10
20
Try this :-
Declare @xml xml
set @xml='
10
20
0
'
Select @xml.value('sum(/Parent/Child)','int') as Sum
Result : 30
or if you want the sum for a specific Parent ID
then try the below query
Select @xml.value('sum(/Parent/Child)','int') AS SumVal
where @xml.exist('/Parent[@ID="p"]') = 1;
Demo in SQL FIDDLE