Oracle 10g and XML
PLSQL is a world …. and Oracle an incredible RDBMS, so if you want to produce XML from query or manage XML inside your PLSQL Trigger or Procedure you can in different ways ….
One of the most simple way is using the Oracle function to do that, like :
1 2 3 4 5 |
SELECT sys_xmlgen(pk_id) from sellers; SELECT XMLELEMENT("MAH", XMLELEMENT("pk_id", e.pk_id ||' '|| e.cod_fiscale), XMLELEMENT ( "miamail", e.email)) AS "result" FROM sellers e; |
only with this piece of code you can obtain :
using only too function sys_xmlgen and xmlelement you can build your first XML from a Query.
For more information you can read the official article about Xml in PLSQL a this address