How to get count of a repetating element in xml -tricky -need Help [message #352820] |
Thu, 09 October 2008 14:55 |
kanis
Messages: 61 Registered: November 2006
|
Member |
|
|
I have a xml like as below
<root>
<a>
<b>
<c1> apple1</c1>
<c1> banna</c1>
<c1> apple2</c1>
<c1> apple2</c1>
<c1> apple2</c1>
</b>
<b>
<c1> apple1</c1>
<c1> banna</c1>
<c1> apple2</c1>
</b>
</a>
<a>
<b>
<c1> banna</c1>
<c1> apple2</c1>
</b>
</a>
</root>
how i can write code in pl/sql where my out put will be
like as below
---------------------
under 1st block of a
In 1st block of b ----c1 is repeted 5 times.
In 2nd block of b ----c1 is repeted 3 times.
under 2nd block of a
In 1st block of b ----c1 is repeted 2 times.
-------------------
my input will be xpath //root/a/b/c1.
Please help me . I need it urgently .....
Thanks in advance for your help .
|
|
|
|