title: ORA-31011: XML parsing failed - invalid characters (oracle sql)
body: <p>I'm producing an XML document using SQL on Oracle 11g database. But I'm having a problem with a database field, because the title field holds many characters some of which XML see's as invalid, I'm trying to use the below statement to catch as many as possible and convert them to NULL. </p>
  
  <pre><code>REGEXP_REPLACE (title, '’|£|&amp;|*|@|-|&gt;|/|&lt;|;|\', '', 1, 0, 'i') as title
  </code></pre>
  
  <p>I'm still getting the parse problem so I know there must be more invalid characters I've missed. I know it's failing on this field as when I change the field to a string 'Title' (as below), the document is parsed and it works fine.</p>
  
  <pre><code>REGEXP_REPLACE ('title', '’|£|&amp;|*|@|-|&gt;|/|&lt;|;|\', '', 1, 0, 'i') as title
  </code></pre>
  
  <p>I'm using XML version '1.0" encoding="UTF-8', is there an easy way around this or do I have to locate the records that are failing which could be any from 2 million records. The title field holds song titles from all over the world, could I use REGEXP_REPLACE to get a range of characters between char(32) and lets say char(255) anything not in this range replace with NULL.</p>
  
  <p>OR is there another solution.</p>
  
  <p>thanks in advance guys</p>