set serveroutput on; declare c dbms_xmlgen.ctxhandle; r clob; begin c := dbms_xmlgen.newContext('select * from telefoneOR'); dbms_xmlgen.RowsetTag(c, 'Telefones'); dbms_xmlgen.RowTag(c, 'Telefone'); r := dbms_xmlgen.getXML(c); dbms_output.put_line(r); dbms_xmlgen.closeContext(c); end; create table carro ( id number, decricao sys.xmltype ); insert into carro values( 1, sys.xmltype.createXML(' 1 Gol 1999 ' )); select descricao from carro; select c.descricao.extract('//modelo/text()').getStringVal() from carro c;