Xml Operations Give ORA-31186: Document Contains Too Many Nodes

(Doc ID 2344551.1)

Last updated on JANUARY 03, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


Getting the error 'ORA-31186: Document contains too many nodes' while performing the xml operations xml
xmlagg(xmlelement(e, COL1|| ',')order by COL2).extract('//text()')).getclobval()

The source data is coming from a table. The xml operation is performed on the values from COL1.

"ORA-31186: Document contains too many nodes
31186. 00000 - "Document contains too many nodes"
*Cause: Unable to load the document because it has exceeded
the maximum allocated number of DOM nodes.
*Action: Reduces the size of the document.


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