In order to use LONG datatype, first convert to xml, then extract value from xml.
One example is DBA_TAB_PARTITIONS.HIGH_VALUE,
with xml as (
select dbms_xmlgen.getxmltype('
select table_owner,
table_name,
tablespace_name,
partition_name,
partition_position,
round((blocks * 8192)/1024/1024,0) size_mb,
high_value
from dba_tab_partitions
where table_name = ''&table''
and table_owner = ''&schema''') as x
from dual)
select extractvalue(rws.object_value, '/ROW/TABLE_OWNER') table_owner,
extractvalue(rws.object_value, '/ROW/TABLE_NAME') table_name,
extractvalue(rws.object_value, '/ROW/TABLESPACE_NAME') tablespace_name,
extractvalue(rws.object_value, '/ROW/PARTITION_NAME') partition_name,
extractvalue(rws.object_value, '/ROW/PARTITION_POSITION') partition_POSITION,
extractvalue(rws.object_value, '/ROW/SIZE_MB') size_mb,
extractvalue(rws.object_value, '/ROW/HIGH_VALUE') high_value
from xml x,
table(xmlsequence(extract(x.x, '/ROWSET/ROW'))) rws