如何使用BREX数据模块检测空(How do I detect an empty with a BREX data module)

编程入门 行业动态 更新时间:2024-10-08 18:35:07
如何使用BREX数据模块检测空(How do I detect an empty with a BREX data module)

我需要确保使用XPath 1的BREX数据模块没有空<para>实例.// //para[not(text()]工作正常,除非我的所有文本都包含在<emphasis> ,显示为错误。如何添加包装文本?

I need to make sure that there are no instances of an empty <para> with my BREX data module using XPath 1. //para[not(text()] works OK unless I have all the text wrapped in <emphasis>, which shows as an error. How can I add wrapped text?

最满意答案

尝试使用node()而不是text()因为前者涵盖了您需要的文本节点和元素节点:

//para[not(node())]

Try using node() instead of text() since the former covers both text nodes and element nodes as you needed :

//para[not(node())]

更多推荐

本文发布于:2023-08-07 13:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464043.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   模块   数据   BREX   module

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!