Possible Duplicate:
Sending XPath a variable from Java
When I run this expression:
XPathExpression xpe = xpath.compile("//bb[name/text()='k2']/value");
It works fine.
But when I try to plant my own variable (instead of 'k2') like this:
XPathExpression xpe = xpath.compile("//bb[name/text()=" + c_name +"]/value");
tt doesn't work.
I assume the problem is that the working expression syntax contain 'k2' while the second dont appear that way.
Any ideas how to plant the variable correctly? i tried putting String and Character[] both dont work.