DBMS_XMLDOM.setNodeValue = ORA-20110: NO_MODIFICATION_ALLOWED_ERR (Doc ID 394010.1)

Last updated on AUGUST 29, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.1 - Release: 10.1 to 10.2
Information in this document applies to any platform.
Checked for Relevance on 30-Aug-2010

Symptoms

In Oracle 10g, calling DBMS_XMLDOM.setNodeValue fails in SQL*Plus with the following errors:

SQL> DECLARE
  2   l_clob    clob;
  3   l_xdomdoc DBMS_XMLDOM.domdocument;
  4   l_xnl     DBMS_XMLDOM.DOMNodelist;
  5   l_xparser DBMS_XMLPARSER.parser;
  6   l_xe      DBMS_XMLDOM.DOMElement;
  7   l_xn      DBMS_XMLDOM.DOMNode;
  8  BEGIN
  9   l_clob := '<emp><name>De Selby</name></emp>';
 10   l_xparser := DBMS_XMLPARSER.newparser;
 11   DBMS_XMLPARSER.parseclob (l_xparser, l_clob);
 12   l_xdomdoc := DBMS_XMLPARSER.getdocument (l_xparser);
 13   l_xe := DBMS_XMLDOM.getDocumentElement(l_xdomdoc);
 14   l_xnl := DBMS_XMLDOM.getElementsByTagName(l_xe, 'name');
 15   l_xn := DBMS_XMLDOM.item(l_xnl, 0);
 16   DBMS_XMLDOM.setNodeValue(l_xn, 'Smith');
 17  END;
 18  /
DECLARE
ERROR at line 1:
ORA-20110: NO_MODIFICATION_ALLOWED_ERR
ORA-06512: at "XDB.DBMS_XMLDOM", line 98
ORA-06512: at "XDB.DBMS_XMLDOM", line 387
ORA-06512: at line 16

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms