XML Database (MOSC)

MOSC Banner

Not NULL XMLTYPE column has zero length - how is this constructed?

edited Jun 28, 2013 1:31AM in XML Database (MOSC) 5 commentsAnswered
We are in the process of migrating a database across platforms and have come up against an error during import for certain rows of a table containing an XMLTYPE column.  If I select the column, for some rows, I get this:
  select XML
    from DOSSIER
   WHERE id = 67989; 
ERROR:
OCI-31011: XML parsing failed


If I look at the length of the column contents in the following fashion:

 select dbms_lob.getlength(xmltype.getclobval(xml)) as xmllen
  from DOSSIER
 WHERE id = 67989;

    XMLLEN
----------
         0


Oracle reports that the length of the value is 0.  However, it isn't NULL:

update DOSSIER
  SET XML = NULL
  WHERE id = 67989;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center