I have the following html and I am trying to figure out the right selector logic to read in certain part. NOTE: I can't change the html as this is being generated by a plugin.
<li class="select2-selection__choice" title="">
<span class="select2-selection__choice__remove" role="presentation">×</span>
MS Office
</li>
<li class="select2-selection__choice" title="">
<span class="select2-selection__choice__remove" role="presentation">×</span>
Photoshop
</li>
and I am trying to read out the text inside the
<li class="select2-selection__choice">
but NOT including the
<span class="select2-selection__choice__remove">
so for the example above, I am looking to parse out the following text:
MS Office, Photoshop