Query tool will return the following error if one of the columns displayed in the query or an attribute used in the criteria contain invalid characters such as squares.
'There is an error in XML document (15765, 943)'
To resolve this issue do the following:
1. Run the query again but change the criteria so that it returns a smaller result set and see if the error is still returned. If an error is returned you know the corrupt data is within the criteria range, change the criteria to return an even smaller result set and see if the error is returned. Keep doing this until you have narrowed the problem to a few invidual results and then look at those results in the database to see if there are invalid characters.
To fix the issue, simply remove the invalid characters.