ChatGPT解决这个技术问题 Extra ChatGPT

xpath: find a node that has a given attribute whose value contains a string

Is there an xpath way to find a node that has a given attribute whose value contains a given string?

For example I have an xml document and want to find a node where the address attribute contains the string Downing, so that I could find the following node:

<person name="blair" address="10 Downing St. London"/>

v
vartec
select="//*[contains(@address,'Downing')]"

Tested with Notepad++ XML Tools, returns the node fine. Good job.
Remember to avoid the '//' if possible. :-) Good job though.
@Jweede yeah, I know. But as the node wasn't specified, I assumed that he wants every node with that attribute.
Been looking all over for a way to do "like" style searching for the value of an attribute. Thanks!