views:

556

answers:

1

I'm trying to convert some xml data coming from a CLOB to a XMLType column.

The XML have some accentuated characters as values (documents are written in french).

Here is what the instruction looks like :

insert into mytable (id, xmldata) values (p_id, xmltype(p_xmldata));

p_id and p_xmldata are variables previously extracted from the original table.

I think the french characters prevents XMLType to work correctly. Or maybe malformed XML tags? The problem is, the table holds 3k+ XML documents and only 2 are converted in the XMLType column.


Update these are the errors I get when I try a simple

select xmltype(xmldata) from mytable

ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.XMLTYPE", line 254 ORA-06512: at line 1

+2  A: 

I used createxml method and now it works fine

insert into mytable (id, xmldata) values (p_id, xmltype.createxml(p_xmldata));
Philippe
Thanks, you saved my day!!. I was having the same error.
Manolo Santos