SQL>
SQL> CREATE TABLE myTable (
2 fall_id NUMBER,
3 fall SYS.XMLType
4 );
Table created.
SQL>
SQL> INSERT INTO myTable VALUES (1, SYS.XMLType.CreateXML(
2 '
3
4 myTable
5 USA
6 MI
7
8 http://your.com
9
10 '));
1 row created.
SQL>
SQL> <>
2 DECLARE
3 fall SYS.XMLType;
4 url VARCHAR2(80);
5 BEGIN
6
7 SELECT fall INTO demo_block.fall
8 FROM myTable f
9 WHERE f.fall_id = 1;
10
11 url := fall.extract('/fall/url/text()').getStringVal;
12 DBMS_OUTPUT.PUT_LINE(url);
13 END;
14 /
PL/SQL procedure successfully completed.
SQL>
SQL> drop table myTable;
Table dropped.
SQL>