xmlagg is an aggregate function. It takes a collection of XML fragments and returns an aggregated XML document. Any arguments that return null are dropped from the result.
xmlagg is similar to sys_xmlagg except that xmlagg returns a collection of nodes, but it does not accept formatting using the XMLFormat object. Also, xmlagg does not enclose the output in an element tag as does sys_xmlagg.