Oracle Select with xmlquery() error - How to ignore errors?
I don't think you can directly. I don't know of a way of putting the XML parser into a sort of "lax" mode where it would ignore validation errors, and you can't catch exceptions inside plain SQL.

One approach to deal with this (except harassing your outside source so that they produce valid XML, which is the solution) would be to validate the XML as you store it, and only process data that has been validated. You can do that simple PL/SQL code. Here's a minimal example of one way to approach this.

Sample table and data:

create table foo(id int, xml clob, valid int default null);
insert into foo(id,xml) values (1, '&lt;?xml version="1.0"?&gt;&lt;root&gt;&lt;a foo="b"&gt;&lt;/a&gt;&lt;/root&gt;');
insert into foo(id,xml) values (2, '&lt;?xml version="1.0"?&gt;&lt;root&gt;&lt;a foo="&lt;"&gt;&lt;/a&gt;&lt;/root&gt;');
commit;


Validation function:

create function is_valid_xml(xml_param clob)
return int
as
  scratch xmltype;
begin
  select xmltype(xml_param) into scratch from dual;
  return 1;
exception
  when others then
    return 0;
end;
/


Applying the validation function

SQL&gt; update foo set valid = is_valid_xml(xml) where valid is null;
2 rows updated.

SQL&gt; select id, valid from foo;
ID | VALID
----------
 1 |     1
 2 |     0


You can then query/report based your usual criteria plus the valid column.