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

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

For example, I have an XML document and you 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"/> 
+55
contains xml xpath
Mar 05 '09 at 13:44
source share
1 answer
 select="//*[contains(@address,'Downing')]" 
+117
Mar 05 '09 at 13:50
source share



All Articles