ORA-31196: XML nodes over string in size cannot be printed
Cause: An attempt was made to use an XML Text Node with a size greater than 64K, or an XML Comment Node with a size greater than 4K. These cannot be printed. For example, trying to add children to an attribute node, or passing in a document node as a child, are unsupported operations.
Action: Use getClobVal() or getStringVal() to print the Document.
ORA-31196表示XML节点字符串太大,无法打印。
ORA-31196是Oracle XML DB抛出的一个异常错误,当要输出的XML节点长度超过了Oracle DB中控制的最大字符串长度时,会抛出此错误。
当查询结果为超长字符串时,报此错误;当某变量定义的字符串长度超过了Oracle DB中控制的最大字符串长度时,也可能会报出这个错误。
处理ORA-31196的一般步骤是:
1.把Oracle DB中控制字符串长度参数设置为准确的值,限制输出字符串的长度;
2.缩短要输出XML节点的字符串长度;
3.把XML节点字符串分割成多行来输出,这样可以提高输出的速度和效率。