Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-30625 / xmltype

ORA-30625 / xmltype

From: Hugues Parvillers <Hugues.Parvillers_at_AgdF.com>
Date: Tue, 23 Jul 2002 21:47:26 +0200
Message-ID: <3D3DB2CE.C9AD4B38@AgdF.com>


the following script gives an error.
-- QUOTE ------------------------------------
declare
vl_xml sys.xmltype;
vl_xml2 sys.xmltype;
begin
vl_xml2 := sys.xmltype.createxml( '<aff_001 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=""><upd><aff>458</aff><mod>EVT</mod></upd></aff_001>' );
vl_xml := sys.xmltype.createxml('<aff_001 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=""><get><aff>458</aff></get></aff_001>' );

dbms_output.put_line('step 1') ;
IF vl_xml.existsnode('/aff_001/new/text()')=1 THEN
dbms_output.put_line('1st test : new') ;
ELSIF vl_xml.existsnode('/aff_001/upd/node()')=1 THEN dbms_output.put_line('2st test : upd') ; ELSIF vl_xml.existsnode('/aff_001/get/node()')=1 THEN dbms_output.put_line('3st test : get') ; dbms_output.put_line('Play again !') ;
IF vl_xml.extract('/aff_001/upd').isfragment() =1 THEN dbms_output.put_line('isfragment corrupts the xml' ) ; ELSIF vl_xml.existsnode('/aff_001/get/node()')=1 THEN dbms_output.put_line('should be ok again !') ; END IF;
END IF;
dbms_output.put_line('Ok');
exception
when others then
dbms_output.put_line('(exception) ' || sqlerrm);
dbms_output.put_line('demontration the syntax is correct') ;
dbms_output.put_line( vl_xml2.existsnode('/aff_001/upd/node()') ) ;
dbms_output.put_line( vl_xml2.extract('/aff_001/upd').isfragment() ) ;
end;
/
-- UNQUOTE ------------------------------------
For me, it shows that the MEMBER FUNCTION isfragment corrupts the vl_xml variable when this variable should never change in the script !

Could anybody convince me that this is my fault and not the one of Oracle 9i ???

Tks in adv

H/P
France Received on Tue Jul 23 2002 - 14:47:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US