I would like to construct an XPath query that will return a \"div\" or \"table\" element, so long as it has a descendant containing the text \"abc\". The one caveat is that it
//div[
descendant::text()[contains(., "abc")]
and not(descendant::div or descendant::table)
] |
//table[
descendant::text()[contains(., "abc")]
and not(descendant::div or descendant::table)
]