за SQL решение:
select
XMLType.createxml(
package_name.storedProcName('PARAM1', 'PARAM2', 'PARAM3')
) as sresult
from dual;
което трябва да избегне грешката в конструктора.
например
SQL> select xmltype.createxml(mycur(0)) from dual;
XMLTYPE.CREATEXML(MYCUR(0))
-------------------------------------------------------------------------------
SQL> select xmltype(mycur(0)) from dual;
ERROR:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.XMLTYPE", line 334
ORA-06512: at line 1
no rows selected
x
SQL>