If you are trying to search your own site, you can use the Site Search (paid) to send requests and get results in XML.
http://www.google.com/coop/docs/cse/resultsxml.html Hope that helps, Avi Rappoport SearchTools.com On Jul 25, 12:32 pm, Mike Norman <[email protected]> wrote: > I am experimenting with the REST interface into Google AJAX Search in > Java > and I would like to know if there is a way to force the returned > contents to be > in XML instead of JSON? > > ... > getEstimatedResultcount(String site, String keyword) { > URL url = new URL("http://ajax.googleapis.com/ajax/services/search/ > web?v=1.0&q=" + > keyword + "+site%3A" + site); > URLConnection connection = url.openConnection(); > String line; > StringBuilder builder = new StringBuilder(); > BufferedReader reader = new BufferedReader(newInputStreamReader( > connection.getInputStream())); > while((line = reader.readLine()) != null) { > builder.append(line); > } > > } > > Is it possible to add something like "+output:XML" to the URL or > perhaps a > 'Content-Type=text/xml' setting on the message header? > > Any help would be greatly appreciated, > Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-AJAX-Search-API?hl=en -~----------~----~----~----~------~----~------~--~---
