title: Java cleaning up String values to remove unwanted characters
body: <p>I have a XML file which contains values having unwanted characters like  </p>
  
  <pre><code>\xc2d
  d\xa0
  \xe7
  \xc3\ufffdd
  \xc3\ufffdd
  \xc2\xa0
  \xc3\xa7
  \xa0\xa0
  '619d813\xa03697'
  \xe9.com
  </code></pre>
  
  <p>input examples could be  </p>
  
  <pre><code>name : John Hinners\xc2d
  email: abc@gmail\xe9.com
  and others ....  
  </code></pre>
  
  <p>desired output should be</p>
  
  <pre><code>name : John Hinners
  email: abc@gmail.com
  and others ....  
  </code></pre>
  
  <p>I come from python background where this task can be done easily as  </p>
  
  <pre><code>def remove_non_ascii(s):
      return ''.join(i for i in s if ord(i)&lt;128)  
  </code></pre>
  
  <p>Is there some similar way to perform the same task in Java?</p>