Can anyone help me with a xpath selector to select all the pre tags within a page, but only if they are not within another pre tag? (even if multiple levels deep)
It would be awesome if this could all be done within one selector, rather than just selecting all pre tags and breaking if they have pre as a parent.
Like this?
//pre[not(ancestor::pre)]