SQL> CREATE TABLE testxml (id NUMBER(3), dt SYS.XMLTYPE);
Table created.
SQL>
SQL> DECLARE
2 x clob;
3 BEGIN
4 x := '<?xml version="1.0"?>
5 <customer><name>C C</name><title>Golfer</title>
6 </customer>';
7
8 INSERT INTO testxml VALUES (123,
9 sys.xmltype.createxml(x)
10 );
11 end;
12 /
PL/SQL procedure successfully completed.
SQL> SELECT *
2 FROM testxml
3 /
ID DT
--------------------------------------------------------------------------------------
123 <?xml version="1.0"?><customer><name>C C</name><title>Golfer</title></customer>
SQL>
SQL> drop table testxml;
Table dropped.
SQL>
|