My html is like this, I can only identify the `div`'s class, there are no `span`' ids. I need to replace one `href` text and one image with some other text within those `span`s.

```
<div class ="myclass">
    <span style="vertical-align:middle;">
      <a href="http://link1"></a>
    </span>

    <span style="vertical-align:middle;">
      <a href="http://link2"></a>
    </span>

    <span style="vertical-align:middle">
      <span class="myspan">
        <a href="http://testlink3">
        <img title="test" class="imglink"></a>
      </span>
    </span>

    <span>
      <a href="http://link4">Text - *This text needs to be replaced*</a>
    </span>
</div>

```

in the above code, I need to replace the `img` within the third `span` with a clickable text (which should take us to url) and the text within fourth `span` to a new text (keeping the url the same).

How can I get identify these specific `span`s when they are missing ids/classes?