This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If it is simple as replacing each '?' with an empty string then there is no need for replaceAll(), just use
Edit : Thinking about this, it looks to me like the OP has parsed an XML file using the wrong character encoding and now need to get rid of the resulting '?' that are created when the encoder does not recognise some bytes as characters.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.