Check whether string is a well-formed xml

ethelvienna

New Member
I have varchar2 column in DB. And this column stores string in xml format.But not all strings are well-formed xml (some with mistakes).How can I check is this string well-formed xml or not?If this string isn't well formed xml, sql-query like this will fail at runtime:\[code\] select extractvalue(xmltype(some_table.value), 'Attachment/@category') from some_table\[/code\]Xml has following format:\[code\] <Attachment {attributes} />\[/code\]Number of attributes in each string can be different.
 
Back
Top