The method creates an XMLType instance from src XML entity. If parameter src is not an XML entity then it is converted to it via internal call of xtree_doc() or xml_tree_doc(). A schema may be associated with an XML entity by passing its URI as schema_uri; this schema can be used later to validate the structire of the document.
The method 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, XMLType('<emp><empno>221</empno><ename>John</ename></emp>')) Done. -- 00000 msec. insert into XMLTYPE_TEST values (2, XMLType('<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.