You can always return XML from your function if it suits application developers.
XML can be generated in several ways in Oracle, depending on what you installed and which version you are using.
XMLTYPE SQL XMLElement, XMLAttributes, XMLAgg .. XMLTYPE, CLOB.
, , (IMO) dbms_xmlgen:
SQL> set serveroutput on size 1000;
SQL> exec dbms_output.put_line( dbms_xmlgen.getXML( 'select * from dual' ) );
:
<?xml version="1.0"?>
<ROWSET>
<ROW>
<DUMMY>X</DUMMY>
</ROW>
</ROWSET>
"" CLOB.