#[xpath://soapenv:Envelope/soapenv:Body/out:notifications/out:Notification/out:sObject/urn:Summary]
我正在使用上面的XPATH
代码来获取 XML 节点值。它不工作。如何纠正这一点。但以下代码工作正常。
<logger message="#[xpath('//*[local-name()=\'Description\']').text]"" level="INFO" doc:name="Logger"/>
我想使用第一种 XPATH 语法格式我该怎么做?以下代码是我的 XML 虚拟数据。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:out="http://soap.sforce.com/2005/09/outbound" xmlns:urn="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Header/>
<soapenv:Body>
<out:notifications>
<out:OrganizationId>12345</out:OrganizationId>
<out:ActionId>999999</out:ActionId>
<out:SessionId>000000</out:SessionId>
<out:EnterpriseUrl>ggggggg</out:EnterpriseUrl>
<out:PartnerUrl>hhhhhhh</out:PartnerUrl>
<!--1 to 100 repetitions:-->
<out:Notification>
<out:Id>iiiiiiii</out:Id>
<out:sObject>
<!--Zero or more repetitions:-->
<urn:fieldsToNull>jjjjjjj</urn:fieldsToNull>
<urn:Id>789076</urn:Id>
<!--Optional:-->
<urn:FirstName>aaaa</urn:FirstName>
<!--Optional:-->
<urn:LastName>bbbbb</urn:LastName>
</out:sObject>
</out:Notification>
</out:notifications>
</soapenv:Body>
</soapenv:Envelope>