Jump to other node

I’ve got the following SVG code:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="Onload()" onclick="Onclick()">
  <script type="text/javascript" xlink:href="svgDocument.getRootelement_test.js" />
  <g id ="content">
    <rect id="groenerechthoek" x="10" y="10" height="100" width="100" style="stroke:#009900; fill: #00cc00" onclick="Onclick()" />
    <svg id="svg tree 1">
      <text id="dummytxt" x="150" y="60" onload="evtOnload(evt)">Hoi</text>
      <text x="200" y="160" onload="evtOnload(evt)">Hoi</text>
      <text x="200" y="200" onload="evtOnload(evt)">Hoi</text>
    <svg id="svg tree 2"> 
      <text x="200" y="240" onload="evtOnload(evt)">Hoi</text>

I’ve written a function that (1) gets the first <text> element by .getElementById(“dummytxt”), the reference to this element is stored in var textelements . The code continues with getting the other <text> nodes by textelements.nextSibling. But it only gets the siblings in the current <svg> node (svg tree 1) and I need to get the <text> elements in the second <svg> node too.

Is it possible to go to the second <svg> node (svg tree 2)?

Your help is greatly appreciated :slight_smile: