select
to_number(extractValue(value(x),'/ROW/DEPTNO')) as DEPTNO,
substr(extractValue(value(x),'/ROW/DNAME'),1,10) as DNAME,
substr(extractValue(value(x),'/ROW/LOC'),1,10) as LOC
from
table(xmlsequence(extract(xmltype( :xmltext ),'/ROWSET/ROW'))) x
to deliver a regular rowset of data as the view object's result without having to write any XML-parsing code.