Try using method.getResponseBody() instead of method.getResponseBodyAsString(). That may not be your problem, but if you really want to see what is being returned, look at the raw bytes, and not the bytes interpreted as a String object.
--Steve -----Original Message----- From: James Howe [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 21, 2005 4:54 PM To: httpclient-user@jakarta.apache.org Subject: Problem retrieving XML from a URL (Newbie question) I've just started using HTTPClient in my application. I have some simple code which performs a GET request on a URL which returns XML. The XML contains a numeric entity definition for the copyright symbol '©', but when I read the response, it seems tha HTTPClient is converting it to ©. Is there some way to configure HTTPClient to not do this? I'm retrieving the XML content and then passing it on to another process which attempts to parse it and the parsing fails because the entity © isn't defined. I need to have any entities defined in a numeric form maintained in a numeric form. My HTTPClient code looks something like this: HttpClient client = new HttpClient(); GetMethod method = new GetMethod("some url which returns XML"); method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { int statusCode = client.executeMethod(feed.hostConfiguration(), method); // ... result = method.getResponseBodyAsString(); ... If the returned XML contains ©, the content returned by getResponseBodyAsString contains © instead. I want the result to be the same content as what was sent by the server, not processed. I'm using HTTPClient 3.0. Thanks! -- James Howe Contact: http://public.xdi.org/=James.Howe --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]