Xpath 什么是'/';在下面的TIBCO表达式中
我在Tibco business works模块中有以下代码Xpath 什么是'/';在下面的TIBCO表达式中,xpath,tibco,tibco-business-works,Xpath,Tibco,Tibco Business Works,我在Tibco business works模块中有以下代码 $ES_GetInfo/root/pfx4:GetInformationAndPropertyDetailsResponse/pfx4:LicenseInfo/pfx4:CoreEnt/pfx4:Ent [pfx4:Ent/pfx4:EntOfferingCode = $Read_DB_Data/group/ROW/EOC] /pfx4:EntState = "Disabled" 我可以理解它正在将“EntOfferingCode”
$ES_GetInfo/root/pfx4:GetInformationAndPropertyDetailsResponse/pfx4:LicenseInfo/pfx4:CoreEnt/pfx4:Ent
[pfx4:Ent/pfx4:EntOfferingCode = $Read_DB_Data/group/ROW/EOC]
/pfx4:EntState = "Disabled"
我可以理解它正在将“EntOfferingCode”
与“EOC”
进行比较,但无法获取表达式“/pfx4:EntState=‘Disabled’”
根据TIBCO,整个表达式返回一个布尔值
“/pfx4:entState='Disabled'”
的含义是什么。是逻辑的、有条件的还是其他的?整个表达式是逻辑条件。“/”只是XPath(xml路径语言)语法中的xml模式元素分隔符。您可以从这里开始学习tibco xpath
表达式首先过滤所有具有EntOfferingCode=$Read\u DB\u Data/group/ROW/EOC的“Ent”节点
然后检查筛选结果中是否存在EntState=“Disabled”
表达式可以替换为
not (empty($Start/pfx:GetInformationAndPropertyDetailsResponse/pfx:LicenseInfo/pfx:CoreEnt/pfx:Ent[ pfx:EntOfferingCode= "EOC" and pfx:EntState = "Disabled"]))
比如说
如果模式是
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd"
targetNamespace="http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="GetInformationAndPropertyDetailsResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="LicenseInfo" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LicenseInfo">
<xs:complexType>
<xs:sequence>
<xs:element ref="CoreEnt" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CoreEnt">
<xs:complexType>
<xs:sequence>
<xs:element ref="Ent" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Ent">
<xs:complexType>
<xs:sequence>
<xs:element name="EntOfferingCode" type="xs:string"/>
<xs:element name="EntState" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
对于这两个示例,它都将返回true如果您的问题是xslt表达式的含义是什么,它基本上是检查以下内容:
<?xml version = "1.0" encoding = "UTF-8"?>
<GetInformationAndPropertyDetailsResponse xmlns = "http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd">
<LicenseInfo>
<CoreEnt>
<Ent>
<EntOfferingCode>EOC</EntOfferingCode>
<EntState>Disabled</EntState>
</Ent>
</CoreEnt>
</LicenseInfo>
</GetInformationAndPropertyDetailsResponse>
<?xml version = "1.0" encoding = "UTF-8"?>
<GetInformationAndPropertyDetailsResponse xmlns = "http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd">
<LicenseInfo>
<CoreEnt>
<Ent>
<EntOfferingCode>EOC</EntOfferingCode>
<EntState>Enabled</EntState>
</Ent>
<Ent>
<EntOfferingCode>EOC1</EntOfferingCode>
<EntState>Disabled</EntState>
</Ent>
</CoreEnt>
</LicenseInfo>
</GetInformationAndPropertyDetailsResponse>
$ES_GetInfo/root/pfx4:GetInformationAndPropertyDetailsResponse/pfx4:LicenseInfo/pfx4:CoreEnt/pfx4:Ent/pfx4:EntState = "Disabled"