Link to home
Start Free TrialLog in
Avatar of NewtonianB
NewtonianB

asked on

xpath select from variable xpath

I don't understand why the following gives results
myNavigator.Select("myrun/exe/item[type='cett']/group/grouping[@itemval='e:\\eel.exe']/..")

but this doesn't
myNavigator.Select(myClass.xpathVal)
myClass.xpathVal equals exactly the same value.


edit: I think I just found out its because in the variable the escaped backslash each are escaped again so in my string variable its
e:\\\\ instead of e:\\
how do I resolve this? I'm getting the xpath string from a file and its needed to it to have \\
ASKER CERTIFIED SOLUTION
Avatar of crysallus
crysallus
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial