title: Oracle dbms_xmldom How to create a blob node?
body: <p>I do have the CR_ELEMENT procedure which gives me the possibility to add a node.
  I must create a blob node now and i was wondering how to do it with a procedure like CR_BLOB_ELEMENT.</p>
  
  <p>Can someone give me a hint on how to do it ?</p>
  
  <p>Regards,</p>
  
  <p>Pierre</p>
  
  <p>PS : I'm using Oracle Database 11g Release 11.2.0.4.0</p>
  
  <pre><code> CR_BLOB_ELEMENT(l_domdoc in out dbms_xmldom.DOMDocument,
                                 ref_node in dbms_xmldom.DOMNode,
                                 nomel    in varchar2,
                                 blobtobeadded   in blob)
  
  
     procedure CR_ELEMENT(l_domdoc in out dbms_xmldom.DOMDocument,
                             ref_node in dbms_xmldom.DOMNode,
                             nomel    in varchar2,
                             vnomel   in varchar2) as
  
          element  dbms_xmldom.DOMElement;
          node     dbms_xmldom.DOMNode;
          text     dbms_xmldom.DOMText;
          textnode dbms_xmldom.DOMNode;
        begin
          element  := dbms_xmldom.createElement(l_domdoc, nomel);
          node     := dbms_xmldom.appendChild(ref_node,
                                              dbms_xmldom.makeNode(element));
          text     := dbms_xmldom.createTextNode(l_domdoc, vnomel);
          textnode := dbms_xmldom.appendChild(node, dbms_xmldom.makeNode(text));
  
        end;
  </code></pre>