In the section "Get full result", inside searchQuery function, you read lines (rd.readLine()) but you don't add the line separator to the String. Thus, in some cases, the urls from the results are wrong.
Also, you should use "UTF-8" as the charsetName for the InputStreamReader, since the XML returned from the server has that encoding.
In the section "Get full result", inside searchQuery function, you read lines (rd.readLine()) but you don't add the line separator to the String. Thus, in some cases, the urls from the results are wrong. Also, you should use "UTF-8" as the charsetName for the InputStreamReader, since the XML returned from the server has that encoding.