【发布时间】:2012-03-16 06:39:32
【问题描述】:
是否可以在 .Net XPath 评估器中添加/使用自定义函数?例如,我想使用 xPath 1.0 不支持的正则表达式进行搜索。我可以添加类似的东西
bool RegexSearch(string regex, string text)
并用类似于
的东西注册它xPathNavigator.RegisterFunction("regex-search",RegexSearch);
所以我可以在我的 xPath 查询中使用它?
【问题讨论】: