根据标签值从肥皂响应中提取值
我的肥皂响应如下:
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fn35="http://www.filenet.com/ns/fnce/2005/02/ws/schema" xmlns:fn40m="http://www.filenet.com/ns/fnce/2006/11/ws/MTOM/schema"
xmlns:fn40="http://www.filenet.com/ns/fnce/2006/11/ws/schema" xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:e="http://www.w3.org/2003/05/soap-envelope">
<e:Body>
<ExecuteChangesResponse xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<ChangeResponse id="1" classId="Document" objectId="{F4CA442A-CE20-45E8-8372-7F34367113A4}"
objectStore="{2417ADC1-633A-4DE3-ADC1-7B6E85E832A9}"
updateSequenceNumber="0" accessAllowed="998903">
<Property i:type="fn40:SingletonString" propertyId="Owner" settable="1">
<Value>testUser</Value>
</Property>
<Property i:type="fn40:SingletonId" propertyId="Id">
<Value>{F4CA442A-CE20-45E8-8372-7F34367113A4}</Value>
</Property>
</ChangeResponse>
</ExecuteChangesResponse>
</e:Body>
</e:Envelope>
我想提取具有PropertyID =“ ID”的属性的值 所以我尝试了以下内容,然后返回一个空字符串
<property expression="//ExecuteChangesResponse/ChangeResponse/property[@propertyId='Id']/text()" name="Id" scope="default"
type="STRING"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
My soap response is as follows :
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fn35="http://www.filenet.com/ns/fnce/2005/02/ws/schema" xmlns:fn40m="http://www.filenet.com/ns/fnce/2006/11/ws/MTOM/schema"
xmlns:fn40="http://www.filenet.com/ns/fnce/2006/11/ws/schema" xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:e="http://www.w3.org/2003/05/soap-envelope">
<e:Body>
<ExecuteChangesResponse xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<ChangeResponse id="1" classId="Document" objectId="{F4CA442A-CE20-45E8-8372-7F34367113A4}"
objectStore="{2417ADC1-633A-4DE3-ADC1-7B6E85E832A9}"
updateSequenceNumber="0" accessAllowed="998903">
<Property i:type="fn40:SingletonString" propertyId="Owner" settable="1">
<Value>testUser</Value>
</Property>
<Property i:type="fn40:SingletonId" propertyId="Id">
<Value>{F4CA442A-CE20-45E8-8372-7F34367113A4}</Value>
</Property>
</ChangeResponse>
</ExecuteChangesResponse>
</e:Body>
</e:Envelope>
and I want to extract the value of the property that has propertyId="Id"
so I tried the following and it returns an empty string
<property expression="//ExecuteChangesResponse/ChangeResponse/property[@propertyId='Id']/text()" name="Id" scope="default"
type="STRING"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够提取以下值:
I was able to extract the value as follows :