Hello Everyone, I need a help to fetch comma separated list for same node if exists in XML nodes. My XML is like this which is stored in my database:-
<Event>
<Detail>
<List>
<Element>
<name>ABC</name>
<salary>150</salary>
</Element>
<Element>
<name>PQR</name>
<salary>250</salary>
</Element>
</List>
</Detail>
</Event>
I need to get comma separated name list (ABC,PQR ) from this using xpath oracle query. I have tried alot and when i get a way like this :-
NVL(VALUE (line).EXTRACT ('/Event/Detail/List/Element/name/text()') .getstringval (),'') Name List
Then , my output was ABCPQR.
No Space or comma was there. Could anyone please help me out for this .
Expected output is :- ABC,PQR
Thanks in advance :)