日期:2014-05-17 浏览次数:21222 次
create or replace procedure aaaproc is document xmldom.DOMDocument; domElement xmldom.DOMElement; tempnode xmldom.DOMNode; RR varchar2(4000); xmldoc clob; begin document := xmldom.newDOMDocument; domElement := xmldom.createElement(document,'coco'); xmldom.setAttribute(domElement,'uname','huangj'); --xmldom.setNodeValue(domElement,'helloworld'); tempnode := xmldom.appendChild(xmldom.makeNode(document),xmldom.makeNode(domElement)); xmldom.setVersion(document, '1.0'); xmldom.setCharset(document, 'GBK'); xmldoc := ' '; xmldom.writeToClob(document, xmldoc); xmldom.freeDocument(document); RR := xmldoc; dbms_output.put_line(RR); end;