In ESQL, you can select from the xml (InputRoot).
example XML:
<io:document-publication-request xmlns:io="http://...">
<io:request-information>
</io:request-information>
<!-- To be expected if there are several channels (localprint, externalprint, infobox, doccle, zoomit, email, sms) -->
<io:publication-information>
<io:channels>
<io:channel>localprint</io:channel>
...
<io:channel>infobox</io:channel>
</io:channels>
<io:priority>7</io:priority>
<io:datas>
<!-- LocalPrint Data -->
<io:data name="user-id">MXYZ</io:data>
<io:data name="printer-id">PXYZ</io:data>
<io:data name="nbr-copy">1</io:data>
<io:data name="print-duplex">false</io:data>
<io:data name="print-color">false</io:data>
<io:data name="paper-retry">false</io:data>
<!-- Infobox Data -->
<io:data name="send-paper">false</io:data>
<io:data name="send-paper-delay">0</io:data>
<io:data name="reminder-mail-code">true</io:data>
<io:data name="reminder-mail-delay">5</io:data>
</io:datas>
</io:publication-information>
I need to read the the data where the name (attribute) is 'MXYZ'.
ESQL:
SET OutputLocalEnvironment.Variables.arrayUserId[] = (SELECT D AS
value FROM
InputRoot.XMLNSC.ggw:"document-publication-request".ggw:"publication-information".ggw:datas.ggw:data[]
AS D WHERE D.name = 'MXYZ');
Following your example (guessing from your example and namespace is mandatory!):
<getDocumentList>
<searchType>
<KeySet>
<keyIdentifier>SIN</keyIdentifier>
<text>abc</text>
</KeySet>
<KeySet>
<keyIdentifier>TIN</keyIdentifier>
<text>xyz</text>
</KeySet>
</searchType>
</getDocumentList>
SET OutputLocalEnvironment.Variables.arrayKeySet[] = (SELECT K AS
value FROM
InputRoot.XMLNSC.ns:getDocumentList.ns:searchType.ns:KeySet[]
AS K WHERE K.keyIdentifier = 'TIN');
You read all the KeySet as an array. You make a restriction on KeyIdentifier='TIN'.
Then into the OutputLocalEnvironment, you have access to an array of KeyIdentifier with normally only one entry.
You can do something like:
SET OutputLocalEnvironment.Variables.text =
COALESCE(OutputLocalEnvironment.Variables.arrayKeySet[1].text, '?');
If for some reasons text is empty you assign '?' to OutputLocalEnvironment.Variables.text.
This was built on your XML. In IIB, you have to experience a bit to find the correct solution. You got the idea...
REF:
https://www.ibm.com/docs/en/integration-bus/10.0?topic=reference-example-message
https://www.ibm.com/docs/en/integration-bus/10.0?topic=body-accessing-attributes-elements