5.21.1 What can I use the XMLQueryService for?

Use the XMLQueryService when you need to selectively interrogate a limited number of particular values in an XML document.

For example, suppose you have an application that receives and processes sales orders in an agreed XML format.

One part of your application might process the sales order XML document in its entirety, perhaps using other LANSA Integrator services or a LANSA Composer Transformation Map to read the contents and update your application database.

However, an independent code unit in your application is required to email an acknowledgement of the order.  In order to do so, the most convenient means to access the customer's return email address is directly from the corresponding element value in the original sales order XML document.

In such circumstances, your application could use the XMLQueryService to selectively and efficiently address and retrieve just the value of the element (or attribute) in the sales order XML document that contains the customer's return email address.