【发布时间】:2011-07-19 09:29:29
【问题描述】:
更新:我在Adding XPath 2.0 functionality and variables to .NET XPath(我的博客)上写下了我所做的事情,以及源代码和需要注意的事项。
有没有办法将正则表达式传递给 .NET 中的 XPath 语句的 match()?
示例:做一个
的 xpath"/windward-studios/Employees/Employee[matches(string(LastName), '.*A?B[12]C.*')]"
【问题讨论】:
-
你能提供一些你想要做什么的例子吗?
-
有趣。不必使用此 xpath 功能,因此在看到答案之前我不知道 .NET 不支持它。看起来其他帖子 stackoverflow.com/questions/1525299/xpath-and-xslt-2-0-for-net 涵盖了在 .NET 中提供支持的库。