I am trying to exclude three <td>
elements from a result set:
<td>
🥇
</td>
<td>
🥈
</td>
<td>
🥉
</td>
I've tried using:
td[not(contains(., '🥈'))]
For example, but the element I don't want still comes back...
CodePudding user response:
In the xpath expression, you need to use the escape conventions of the host language. Using &-escaping is fine if the host is XSLT, but if it’s JavaScript, for example, you’ll need to use backslash escaping.
CodePudding user response:
To avoid the labyrinth of escaping conventions, just use literal Unicode characters themselves, which can be searched and then copy-and-pasted from sites such as Compart:
Char Entity Ref | Literal Unicode | XPath |
---|---|---|
🥇 |
|