We usually write our Search Path in findnodes()
function as below
//parentNode[subNode/text() = 'CPUUSAGE']/subNode
what is I want to match a part of the text here and find all the nodes?
something like
//parentNode[subNode/text() =~ '/CPUUSAGE'/]/subNode
Obviously this is Invalid xPath...
Any thoughts how to achieve this?
I know I can first find the nodes and then try to match the textContent
. But Can we do that in one shot directly in findnodes()
?