JSFiddle - React, Tailwind, and code Playground

by Luca Giuberti

HTML

<a id="my">
  testo a
  <b>
    testo z
  </b>
  
</a>

JavaScript

console.log($x("//*[@id='my']//text()"));