Is it possible to select an h1 tag that does not contain any img tags with a single line XPath expression? If so, what is it?
Use the not
operator and the descendent
axis to catch h1 tags without even a distant img child.
//h1[not(descendant::img)]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With