Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing XML tags from CLOB or VARCHAR column

Praveen PrabhuMay 9 2016 — edited May 10 2016

Hello All

I have a requirement to convert the contents of a column (actually two columns one is CLOB and the other is VARCHAR) into readable text. Both these columns store exactly the same information, the difference being only the data types. So I can use either of them for extracting the text.

I tried using REPLACE but there are so many that this will surely affect performance and at the end of it I might not have covered every single tag.

Some example of these tags are

<!-- RICH TEXT -->

<font color="#ff0000>

<div>   etc and so many more!

Some of the data in this column is as attached.

Is there a way to do this i.e. extract only the text part of the content and discard the rest?

Any suggestions will be much appreciated.

Regards

Praveen

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2016
Added on May 9 2016
8 comments
2,040 views