Ok, but...
Why do you NEED to do this?
To use a cursor variable you need to open it. You could create a function that opens the cursor. And pass this function to XMLTYPE.
You can only pass a cursor expression to a function if it's in a select statement:
create or replace function f ( p sys_refcursor )
return int as
retval int;
begin
return 1;
end f;
/
declare
l int;
begin
l := f ( cursor ( select * from dual ) );
end;
/
PLS-00405: subquery not allowed in this context
select f ( cursor ( select * from dual ) ) from dual;
F(CURSOR(SELECT*FROMDUAL))
1