I would like to use XPath to extract all the text from all the <li>
elements, that are in the specialList
list and return one string separated by spaces or commas. Is this possible?
Lets say the DOM includes the following HTML:
<ul class="specialList">
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
Desired Output
one, two, three, four
OR
one two three four