Invalid XML character

I have a program where I have to read some data and then convert it over to XML. I am already replacing common characters (such as < with &lt) so it can be displayed in the browser. However, I think the data's text may have some extra odd characters because I get an error. Any
[299 byte] By [smiles78a] at [2007-11-26 20:30:57]
# 1
Look in the XML document for the "odd characters", find them, match them with whatever is producing them in the Java output, and fix it.
Djaunla at 2007-7-10 1:20:39 > top of Java-index,Java Essentials,Java Programming...
# 2
The thing is I tried that but the odd characters I'm not sure what to search for. It's really funny symbols.
smiles78a at 2007-7-10 1:20:39 > top of Java-index,Java Essentials,Java Programming...
# 3
Search for the garbage characters in your input before you produce the XML. You'll find the documentation for what characters are valid in XML documents in section 2.2 of the XML Recommendation here: http://www.w3.org/TR/REC-xml/#charsets
DrClapa at 2007-7-10 1:20:39 > top of Java-index,Java Essentials,Java Programming...
# 4

> Search for the garbage characters in your input

> before you produce the XML. You'll find the

> documentation for what characters are valid in XML

> documents in section 2.2 of the XML Recommendation

> here:

>

> http://www.w3.org/TR/REC-xml/#charsets

I'm not really sure how to search for the garbage characters though. I get the input as String. The site you gave me gives me a range of characters but how do I tell if the character is in that range?I mean I can

Would this function help?

Character.isISOControl(char ch)

Character.isValidCodePoint(int codePoint)

smiles78a at 2007-7-10 1:20:39 > top of Java-index,Java Essentials,Java Programming...