i/p
******
Code: Select all
<root>
<Tag1>just a tag</Tag1>
<Tag1>just a tag</Tag1>
<A att="10">
<text x="5"> some text 1</text>
<text x= "10"> some text 2</text>
</A>
<Tag1>just a tag</Tag1>
<A x="1"> some text 3</A>
<A x="2"> some text 4</A>
<Tag1>just a tag</Tag1>
<A att="0">
<text x = "15"> some text 5</text>
<text x = "10"> some text 6</text>
</A>
</root>
*******************
15: some text 1
20: some text 2
1: some text 3
2: some text 4
15: some text 5
20: some text 6
*******************
(this may confuse: if "A"contains "text" then, add the values eg: 10+5, and the result of "text")