如何从xslt表中的soap请求中提取值?

时间:2014-05-31 13:27:18

标签: xslt soap

我已经设法在以下XSLT样式表中获取SAR元素下的所有字段,但我想迭代直到'File'标记并检索值。

以下是SOAP请求和XSLT样式表。

请帮我构建一个XSLT样式表,它可以迭代“file”元素并检索值。

SOAP REQUEST:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<soap:Header> 
<nicheheaders xmlns="http://schemas.microsoft.com/nichelite/soap/"/>

</nicheheaders> 
</soap:Header> 
<soap:Body> 
<SendSar xmlns="http://schemas.microsoft.com/sendsar/soap/"/>

<SARDetails> 
<ApplicationId ="ANxxxxxxxx"/>
<LifeAssured="Two"/> 
<PartyID="2BCHg"/>
<SAR>
<filetype="PDF"/>
<filename="abcd"/>
<file>
<insert base64 encoded file here(actual base64 encoded data..since content is too large unable to give the exact value)>
</file>
</SAR>
</SARDetails> 
</SendSar> 
</soap:Body> 
</soap:Envelope> 

XSLT样式表

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions" xmlns:dpconfig="http://www.datapower.com/param/config" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:nsl="http://schemas.microsoft.com/sharepoint/soap/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="soap:Envelope/soap:Body/*[1]/*[1]/*[4]/*[3]">
<xsl:copy-of select="@*" /> 
</xsl:template>
</xsl:stylesheet>

0 个答案:

没有答案
相关问题