开发者

Does a method exist to check whether a string is a valid xpath?

开发者 https://www.devze.com 2023-01-03 21:40 出处:网络
I\'m looking for a quick and easy method to check if a given string is a开发者_Python百科 valid xpath. Does anybody know if something like this exists?You could try to compile it into a XPathExpressio

I'm looking for a quick and easy method to check if a given string is a开发者_Python百科 valid xpath. Does anybody know if something like this exists?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号