I have this basic SOAP response:
<?xml version="1.0" encoding="WINDOWS-1252" standalone="yes"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body xmlns="http://www.xxx.com/dotnet/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<a>
<b>
<c>
c-value
</c>
b-value
</b>
a-value
</a>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
and I want to output just the value of the c node: c-value.
I don't understand why this xsl is NOT working:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="/">
<xsl:value-of select="//c"/>
</xsl:template>
</xsl:stylesheet>
It seems that the problem is in the name space at <SOAP-ENV:Body xmlns="http://www.xxx.com/dotnet/types/"
If I remove it, it works.
I guess I should change the xpath in select="//c"
or add somewhere in the xls the needed namespace, but I can't get it right!