Search code examples
soapmessagebrokeribm-integration-busextended-sql

How to find/reference XML element in unknown SOAP tree structure in ESQL


I have a Soap message which includes various nested nodes within the Soap body. I need to find node 'xyz' but it isn't always in the same location. In the XSLT world I could just use //xyz[1]. Is there equivalent syntax for esql? Something like OutputRoot.SOAP.Body{unknown syntax}.xyz[1]


Solution

  • I don't think there is any equivalent to the xpath '//' syntax in ESQL. If you need it to use it to access a value, you can use a JavaCompute node (see evaluateXpath). Or, you can write a recursive function in ESQL to visit all nodes and test the names. See the CREATE FUNCTION article in Infocenter for an example.