ORA-30625: method dispatch on NULL SELF argument is disallowed
Hi,
I have the following script when i=5 it returns the value it is not always but , depends on the " i" value dynamically based on my .xml
if i use the below syntax i am getting ORA-30625: method dispatch on NULL SELF argument is disallowed, i tried by uncommenting the commented lines below but the i dont get any compilation error but it returns always null though in this case it has to return when my i = 5, any suggestion how to resolve the ORA error.
declare
l_xmltype XMLTYPE;
p_file_name constant varchar2(50) :='xx.xml';
v_temp varchar2(100);
begin
l_xmltype := XMLTYPE(bfilename('XMLDIR',p_file_name),
nls_charset_id('AL32UTF8'));
for i in 1..8 loop
dbms_output.put_line('i'||i);
--if l_xmltype.extract('/html/div/table/tbody/tr/td/b/text()') is null then
--v_temp :=null;
--dbms_output.put_line('v_temp:'||v_temp);
--else
v_temp :=l_xmltype.extract('/html/div/table/tbody/tr/td[i]/b/text()').getStringVal();
dbms_output.put_line('v_tmp:'||v_temp);
--end if;
end loop;
end;
/