Consider the following XML:
<LIST>
<Name>Jon</Name>
<Name>Dan</Name>
<Name>Bill</Name>
<Name>Jack</Name>
</LIST>
I need output as a string as a CSV like Jon,Dan,Bill,Jack
using XQuery.
I have done it using FLWOR expressions and normalize-space
and then replacing the spaces with commas. However, I believe there should be a better way to do it in XQuery.