Use condition in d3.js select
<p>I want to select and remove a textPath from a SVG where <code>xlink:href=id</code>.
A textPath has an attribute xlink:href and I have a variable called 'id'. </p>

<p>I want to remove textPath that has xlink:href equal to the value stored in variable id. </p>

<p>Something like this: </p>

<pre><code>d3.select("textPath*some condition*").remove();
</code></pre>

<p>Can this be done? If yes, how? </p>