My Oracle Support Banner

Xml Operations Give ORA-31186: Document Contains Too Many Nodes (Doc ID 2344551.1)

Last updated on NOVEMBER 16, 2023

Applies to:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

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.
"

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.