Say we have an HTML table which basically looks like this:
Warning: Be careful of the
It is a common mistake to use it to test if an element contains a value. What it really does is test if a string contains a substring. So,
td[contains(.,'8')] takes the string value of
.) and tests if it has any
"8" substrings. This might be what you want, but often it is not.
will select all
td elements whose space-normalized string value equals