ノードを追加および削除するのではなく、display属性をnoneに設定することをお勧めします。
または、ウェイトの数が離散している場合は、次のようにCSSを使用して行うことができます。
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<style type="text/css">
<!-- Hide all links with weights that we don't want -->
.weight0,.weight2,.weight4,.weight6 {display:none}
</style>
<a xlink:href="#" class="weight0">
<text y="20">weight 0</text>
</a>
<a xlink:href="#" class="weight2">
<text y="40">weight .2</text>
</a>
<a xlink:href="#" class="weight4">
<text y="60">weight .4</text>
</a>
<a xlink:href="#" class="weight6">
<text y="80">weight .6</text>
</a>
<a xlink:href="#" class="weight8">
<text y="100">weight .8</text>
</a>
<a xlink:href="#" class="weight10">
<text y="120">weight 1</text>
</a>
</svg>