I’m looking for a quick and easy method to check if a given string is a valid xpath. Does anybody know if something like this exists?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could try to compile it into a XPathExpression. http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathexpression.aspx
The nice side-benefit is that, if it works, you have a compiled expression that you can just execute.