xml - XML短代码返回错误信息,为什么?
问题描述
我用 XML 编写了以下代码:
<# <Conditional Test= "(//Product_Name[text() = ‘LifeID3 Service’ and //Customer_Is_Paying_Maintenance/text())" /> #>
显示此文本
<# <EndConditional/> #>
不知何故,我收到以下错误消息:
(//Product_Name[text() = 'LifeID3 Service' and //Customer_Is_Paying_Maintenance/text())'
有一个无效的令牌。
你能告诉我问题出在哪里吗?
解决方案
XML 元素名称不能以 开头#
,因此在格式良好的<#
XML中是不允许的,因此
我用 XML 编写了以下代码:
<# <Conditional Test= "(//Product_Name[text() = ‘LifeID3 Service’ and //Customer_Is_Paying_Maintenance/text())" /> #>
不正确——那不是 XML。
但是,如果该<#
构造是特定于某些(未指定)应用程序的,那么如果您修复看起来是 XPath 中的语法错误,并且谓词由)
而不是关闭]
:
... [text() = 'LifeID3 Service' and //Customer_Is_Paying_Maintenance/text())
^
推荐阅读
- ansible - Ansible 集合使用
- firebase - Firebase 测试实验室对 Flutter 的不同可能性
- scala - 如何获取具有匹配值的地图
- python - 在numpy数组中传播最大值
- amazon-web-services - 将主体附加到存储桶策略文档而不是覆盖它
- r - 如何为每行索引缺失的 x
- c - getchar 发生了什么?
- reactjs - 在我的情况下进行 React Router 历史推送时如何滚动到页面
- java - Spring Boot Mybatis 动态查询
- reactjs - React,onClick 仅在第二次单击后有效,Axios,Async/Await