Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help with PL/SQL and XmlType
Why does this?
declare
var XMLType; var2 XMLType; buf varchar2(2000);
var := xmltype('<PERSON> <NAME ike="uno"> ramesh </NAME> <NAME ike="duo"> foo </NAME> </PERSON>');
var2 := var.extract( '/PERSON/NAME[@ike="uno"]' );
dbms_output.put_line( 'hello' );
OPEN rc FOR
SELECT extract(value(xooty), '//NAME/text()').getStringVal() AS
empno
FROM table(xmlsequence(extract(var, '/PERSON'))) xooty; LOOP
fetch rc into buf; dbms_output.put_line( buf ); exit when rc%notfound;
return this:
ramesh foo
ramesh foo
I wasn't expecting ramesh and foo to be combined on each row??? Received on Thu Jun 02 2005 - 14:45:28 CDT
![]() |
![]() |