Oracle Error ORA-31187: Cannot Add Node ‘string’ (type=’string’) to Simple Type Node ‘string’

Oracle Error Message

ORA-31187: Cannot Add Node ‘string’ (type=’string’) to Simple Type Node ‘string’

Reason for the Error

Trying to add attribute/element nodes to a simple type against the schema definition. Simple types can have only special attribute like namespaces, xsi:nil etc.

Solution

Use a valid node for the operation.