Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3480614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:22:13+00:00 2026-05-18T10:22:13+00:00

I can easy export table data by using DBMS_XMLGEN. But is there a package

  • 0

I can easy export table data by using DBMS_XMLGEN. But is there a package to reimport this XML?

create table foo(
  id number
 ,text varchar2(30)
)
/

insert into foo values (1,'hello');
insert into foo values (2,'world');

declare
  l_foo_xml Clob;
begin
  l_foo_xml := DBMS_XMLGEN.GETXML('select * from foo');
  delete from foo;
  --- ???? insert the xml into foo ???
end;
/

Thanks
Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:22:14+00:00Added an answer on May 18, 2026 at 10:22 am

    Have you looked at DBMS_XMLSAVE?

    The Oracle documentation doesn’t give examples of it’s use, so a quick google will show you.

    Here is something based on your example. (Which was inspired by the information from here)

    create table foo(
      id number
     ,text varchar2(30)
    )
    
    CREATE OR REPLACE PROCEDURE p(p_xml IN CLOB, 
                                  p_table_name IN VARCHAR2) 
    IS
    
      l_context    DBMS_XMLSAVE.CTXTYPE;
    
      l_rows    NUMBER;
    
    BEGIN
    
      l_context := DBMS_XMLSAVE.NEWCONTEXT(p_table_name); 
    
      l_rows := DBMS_XMLSAVE.INSERTXML(l_context,
                                       p_xml); 
    
      DBMS_XMLSAVE.CLOSECONTEXT(l_context); 
    
    END;
    /
    

    Call the procedure p with some sample xml

    DECLARE
      l_xml CLOB;
    BEGIN
      l_xml := '<ROWSET>
                    <ROW num="1">
                    <ID>123</ID>                
                    <TEXT>Some Text</TEXT>
                    </ROW>
                 </ROWSET>';
    
      p(p_xml => l_xml, 
        p_table_name => 'FOO');
    END;
    /
    

    Query the table

    select *
    from foo
    

    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There must be an easy way to do this, but somehow I can wrap
I'm sure this is easy but I can't figure it out: I have an
I think this will be easy but I can't see how to do it!
Now this must be easy, but how can sum two NSNumber ? Is like:
Is there an easy way with LINQ to flatten an XML file? I can
There gotta be an easy way to do this, I can't believe there's none.
Moving through the maze forward is pretty easy, but I can't seem to figure
In VB.NET is there a library of template dialogs I can use? It's easy
Is there an easy way to export a MS Access Database backend (Tables &
I am writing a software package whose job is to export DB data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.