I am reformatting an HTML document using the Agility Pack, and I've run into a limitation of my understanding of XPath.
In the document I'm working with, the following is a common construct:
1282
Which is built like this:
128<img src="" style="display: none;" alt="^(" /><sup>2</sup><img src="" style="display: none;" alt=")" />
So, when you select that and copy it to the clipboard it turns into:
128^(2)
Now, I would like to use XPath to remove these img
tags.
Here is what I have so far:
//img[@alt='^(' ???/sup]
How do I select an element based on existence of an immediate sibling?