I’m making a parser in rails for a website and I’m having trouble selecting only the stuff I want.
I want to select the following sibling to a td-tag that contains ONLY “World:“, but there’s another td-tag containing “Former World:” that I get too, and I don’t want to select that one.
Here’s my XPath selection:
//td[contains(text(), 'World:')]/following-sibling::td
So I want the tag containing ONLY “World:” and not the other one containing “Former World:“
Any ideas? Spent hours searching for a solution, but now I ended up here.
Does it work if you change it to