title: How to filter out illegal XML character in Java
body: <p>I'm building a web service.</p>
  
  <p>Some one put illegal characters into our database.</p>
  
  <p>Now when I try to retrieve those strings and send them via a webservice, the client chokes.</p>
  
  <p>I get an error such as :</p>
  
  <pre><code>com.sun.xml.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
   - with linked exception:
  [com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 18))
  </code></pre>
  
  <p>How can I remove this character in Java?</p>