Posted on 2012-09-05
Last Modified: 2012-09-28
childnode DBMS_XMLDOM.DOMNode;

childnode := DBMS_XMLDOM.item(child_nodelist, 0);

--childnode contains


I want to achieve at least one of the following:

1) convert the childnode to XMLTYPE?

2) convert the childnode to CLOB?


Question by:eugeneca
    LVL 76

    Accepted Solution

    1) You might need to convert the node to a document/element first but look at:  DBMS_XMLDOM.GETXMLTYPE

    LVL 23

    Assisted Solution

    As slightwv mentioned above, you have to have a document in order to return DBMS_XMLDOM.GETXMLTYPE(<your document here>)

    Something like this:

    xml_doc                      dbms_xmldom.domdocument;

          -- Create handle for new XML doc
          xml_doc := dbms_xmldom.newdomdocument;
          -- Set the prologue
          dbms_xmldom.setversion(xml_doc, p_xml_version);
          -- Make the root node
          root_node := dbms_xmldom.makenode(xml_doc);

         -- Then append the childnode to the rootnode
         dbms_xmldom.appendchild(root_node, child_elmt_node);

    It's more complex than the steps above, but you get the idea...

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
    Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
    This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
    This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now