In the XML message below I can get 'AccountNumber' using
//*[local-name()='AccountNumber']/text()
or
/*[local-name()='GetFullAxxAccountNoResponse']/*[local-name()='GetFullAxxAccountNoResult']/*[local-name()='FullAxxAccNo']/*[local-name()='FullAxxAccountNo']/*[local-name()='AccountNumber']
This works fine in a C# test app or in the Notepad++ XPath plugin, but it does not return anything when used in a BizTalk expression shape, can anyone help flesh this out? I have also tried including the namespace in the top level node but had no luck.
Expression shape code:
vAccount = xpath(mymessage.body, "either one of the xpath statements above")
Instance:
<GetFullAxxAccountNoResponse xmlns="http://temp.org/">
<GetFullAxxAccountNoResult>
<FullAxxAccNo>
<FullAxxAccountNo>
<AccountNumber>123456</AccountNumber>
</FullAxxAccountNo>
</FullxxAccNo>
<SuccessFlag>success</SuccessFlag>
<Message />
</GetFullAxxAccountNoResult>
</GetFullAxxAccountNoResponse>
Those xPaths by themselves will return a Node. To get the text content, you should use a format such as: