Using the XMLELEMENT function

The XMLELEMENT function constructs an XML element from relational data. You can specify the content of the generated element and if you want, you can also specify attributes and attribute content for the element.

 Generating nested elements
 Specifying element content
 Generating elements with attributes
 Example