Link to home
Start Free TrialLog in
Avatar of Devildib
Devildib

asked on

Ora error ORA-31011

Hi experts,

I am reading xml data from a table with clob xml column type.The procedure some times through xml parsing errors because of bad characters within xml tag values.
Is there a generic approach to translate or replace all bad characters that might be causing the xml parsing error?Since we have only read rights, we do not have control over the xml getting stored.basically i need to handle the xml read functionality in a generic way, since for large records, may be only one or two xml's might through the parsing errors.the read operation is nothing but a select of few extracted xml element values.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I think everything has been covered in your very closely related previous questions on this subject.

An just like in your previous questions:
Please provide some sample data that is 'bad' that generates the error.  'bad' can mean many different things.

I realize that you cannot provide actual data but please dummy something up that represents what you need.  Also provide the expected results from the sample data.
>>> Is there a generic approach to translate or replace all bad characters that might be causing the xml parsing error

I showed you this in a previous question.  
Validate the clob against an xsd.

If you can't get that far because the clob won't convert to xml, then wrap it all in a function that will validate both the generic structure as well as the xsd conformance.

Think through what you are asking.

1 Some text shows up, the contents of which are unknown.
2 Read the text looking for anything that might not be correct, but correct isn't specified.
3 Fix the bad stuff which isn't specified so it becomes valid, where valid is not specified.
4 Parse the fixed data as if it were xml and extract unknown fields from it into a standard format

Hopefully that shows why you'll never get an answer that shows you how to do what you want.
It's simply not possible.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Devildib

ASKER

Trigger solution is something that i can propose.