oracle xmltype

  
i have a sql function that returns oracle xmltype like select xmlelement....

how to return this on advanced query to save later on db?
Is this possible to use the xmltype now. 
As far as I know it is only possible te use an advanced query like: 
select extract(xmltype, 'xpath') from dual
and bind it to a Text-Entity/Structure.

Alternative: If you use the .Net stack with your Oracle database, you might take a look at the oracle connecter https://www.outsystems.com/forge/component/392/oracle-connector/ which might execute stored procedures.