|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL XML SELECT not functioning |
« View previous topic :: View next topic » |
Author |
Message
|
dhausler |
Posted: Tue Jan 09, 2018 11:58 pm Post subject: ESQL XML SELECT not functioning |
|
|
Newbie
Joined: 09 Jan 2018 Posts: 1
|
I have incoming XML that may or may not contain 2 address attributes. I need to select only one of them based on attribute they contain. This is the XML:
Code: |
<ClientAddress>
<AddressId>yyy</AddressId>
<City>Jesenice - Zdiměřice</City>
<Country>CZE</Country>
<Street>SokolÃ</Street>
<StreetNumber>139</StreetNumber>
<Zip>25242</Zip>
<AddressType>Dom</AddressType>
<County/>
</ClientAddress>
<ClientAddress>
<AddressId>xxx</AddressId>
<City>Jesenice - Zdiměřice</City>
<Country>CZE</Country>
<Street>SokolÃ</Street>
<StreetNumber>139</StreetNumber>
<Zip>25242</Zip>
<AddressType>Com</AddressType>
</ClientAddress> |
Now I need to select the addres with AddressType='Dom'. To do so, I have this ESQL
DECLARE result ROW;
SET result.address[] = SELECT a.AddressId, a.City, a.Country, a.Street, a.StreetNumber, a.Zip, a.AddressType
FROM CRM.crm:ClientAdresses.crm:ClientAddress[]
AS a
WHERE CRM.crm:ClientAdresses.crm:ClientAddress.crm:AddressType = 'Dom';
Unfortanetly, it doesnt fill the result variable completley. I do see 2 address variables in the result, however they are not populateed with results. Is there something obvious I'm missing?
I'm on IIB 10.0.0.6 |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 10, 2018 5:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Your query shows namespaces (crm). Your XML does not.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|