Oracle XMLElement

SELECT
XMLELEMENT("Objects",
XMLElement("Type", q_typ.obj_type), XMLElement("Count", q_typ.obj_counts)) as xml_out
FROM
(SELECT type obj_type, COUNT(*) obj_counts
FROM user_Source
GROUP BY type
ORDER BY type
) q_typ;


Oracle XMLElement and XMLAttributes

SELECT
XMLElement("Object",
XMLattributes(q_typ.obj_type As "Type", q_typ.obj_counts as "Count")) AS xml_out
FROM (SELECT type obj_type, COUNT(*) obj_counts
FROM all_Source
GROUP BY type
ORDER BY type
) q_typ;


Back

Oracle registered trademark of Oracle Corporation.
Last Revised On: 10/20/2013

  72920