I'm trying to search something in multiple attributes in multiple different nodes
This is how I find it in one attribute
//*[contains(@name,'KEYA')]
Sample XML:
<cars>
<car model="2000" name="Awesome KEYA Car" name2="somethine else">Brand1</car>
<car model="2005" name="Awesome Car" name2="KEYA something else">Brand 2</car>
<car name="Awesome Car" name2="somethine else">Brand1</car>
<car dontmatch="KEYA" name2="somethine else">Brand3333</car>
</cars>
What I really want is something like this for more than 10 attributes (it needs to match only white-listed attributes),
//*[contains((@name or @name2 or @name3),'KEYA')]
Using XPATH 1.0. Any ideas about how to do this? Tried several ways other than repeating contains but didn't work.