XML from Data Base Examples tutorial
Making a Forest of XML elements by XMLCONCAT() function XMLCONCAT() function

## XMLCONCAT() function Overview

XMLCONCAT() accepts a list of XML value expressions as its arguments, and produces a forest of elements by concatenating the XML values that are returned from the same row to make one value. `XMLCONCAT` works like `XMLFOREST`, except that `XMLCONCAT` parameters is a list of XML elements. Null expressions are dropped from the result. If all the value expressions are null, then the function returns null.

## Example 1

This example produces a forest from the 'FName', 'LName' and 'Region' (if a column value is not NULL) elements for each employee:

    select XMLCONCAT (
      XMLELEMENT ('FName', "FirstName"), XMLELEMENT ('LName', "LastName"),
      XMLELEMENT ('Region', "Region") )
    from "Demo"."demo"."Employees";