oracle - dbms_xmldom - How to get the <?xml tag -


i trying line <?xml ....?> @ start of xml document using pl/sql package dbms_xmldom. here code far

declare   l_dom   dbms_xmldom.domdocument;   l_clob  clob;   l_node  dbms_xmldom.domnode;  begin   l_dom := dbms_xmldom.newdomdocument;   l_node := dbms_xmldom.makenode(l_dom);    l_node := dbms_xmldom.appendchild(l_node,                dbms_xmldom.makenode(                 dbms_xmldom.createelement(l_dom, 'root')               )             );    dbms_lob.createtemporary(l_clob, true);    dbms_xmldom.writetoclob(l_dom, l_clob);   dbms_output.put_line(l_clob); end; 

the output is:

<root/> 

expect:

<?xml version="1.0" encoding="utf-8"?> <root/> 

any pointers on how great.

just record - here need add

dbms_xmldom.setversion(l_dom, '1.0" encoding="utf-8'); 

after creating document


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -