DBMS XMLGEN is a PL/SQL package that allows programmers to extract XML data from Oracle database tables. It might be useful when you need a XML file to create XML publisher layouts. Here are 2 examples on how to use it;
SELECT DBMS_XMLGEN.getXML('SELECT * FROM emp') FROM dual;
orDECLARE
ctx DBMS_XMLGEN.ctxHandle;
xml CLOB;
BEGIN
ctx := dbms_xmlgen.newcontext('select * from emp');
dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
xml := dbms_xmlgen.getxml(ctx);
dbms_output.put_line(substr(xml,1,255));
END;
/
0 comments:
Post a Comment