'Using the 'document' function in XSLT, how do you get the value from the contents of the referenced document which is XML?
Right now I call an external webservice and store its response (XML) as a variable like this (using XSL 2.0):
<xsl:variable name="ReturnMICRFormatDocument">
<xsl:value-of select="document($ReturnMICRFormatFullURL)"/>
</xsl:variable>
I then try to read values from specific elements of the returned document's XML:
<xsl:value-of select="$ReturnMICRFormatDocument/Bank/BankName"/>
... but it yields no value. Example of the returned XML:
<?xml version="1.0" encoding="utf-8"?>
<Bank xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RoutingNumber xmlns="">121000248</RoutingNumber>
<BankName xmlns="">WELLS FARGO BANK</BankName>
<FormatMatches xmlns="">
<FormatMatch MatchType="HARD" AccountLength="13">
<CheckMICRFormat>@121000248@XCCCCCCCCCCCCC*XXXXX</CheckMICRFormat>
<DepositMICRFormat>@518200392@XCCCCCCCCCCCCC*XXXXX</DepositMICRFormat>
</FormatMatch>
</FormatMatches>
</Bank>
Thanks for any assistance here!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
