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
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)
Call the procedure p with some sample xml
Query the table