solomonmayo03
New Member
I have a XML in which \[code\]<amount>3.1</amount>\[/code\] tag repeats.This is under another tag \[code\]<main>\[/code\].I need to sum all the values of \[code\]<amount>\[/code\] coming under \[code\]<main>\[/code\] using awk and or sed command.can some help?Sample looks like below\[code\]<root> <Main> <Amt Ccy="EUR">3.1</Amt> <Main> . . . some other tags . <Main> <Amt Ccy="EUR">51</Amt> <Main>\[/code\]