This function creates an XMLType instance. It works absolutely identicaly to the XMLType() constructor and is provided solely for compatibility.
The function returns a new instance of XMLType.
create table XMLTYPE_TEST (I integer primary key, XMLVAL long xml)
Done. -- 00000 msec.
insert into XMLTYPE_TEST values (1, createXML('<emp><empno>221</empno><ename>John</ename></emp>'))
Done. -- 00000 msec.
insert into XMLTYPE_TEST values (2, createXML('<po><pono>331</pono><poname>PO_1</poname></po>'))
Done. -- 00000 msec.
select e.XMLVAL.extract ('//empno/text()').getNumVal() as EMPNO
from XMLTYPE_TEST as e
where e.XMLVAL.existsNode('/emp/empno') = 1
EMPNO
DECIMAL
_______________________________________________________________________________
221
1 Rows. -- 00000 msec.