compiling XPath expression issue

Fade05

New Member
When I run this expression:\[code\] XPathExpression xpe = xpath.compile("//bb[name/text()='k2']/value"); \[/code\]It works fine.But when I try to plant my own variable (instead of 'k2') like this: \[code\] XPathExpression xpe = xpath.compile("//bb[name/text()=" + c_name +"]/value");\[/code\]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.
 
Back
Top