0

I need to translate the blow curl command into Java/Android. I then need to parse the returned string into an XML tree. How can I make the call using Android/Java and how could I parse the string into an XML representation?

Here's the cURL command:

curl http://pubads.g.doubleclick.net/gampad/adxiu=/3576361/XML&sz=1x1&c=123455
  • Are you aware of the difference between a command line utility (like curl) and actual Java/Android code? – childofsoong Feb 09 '16 at 01:05
  • Yes, of course. Reworded to make question clearer. –  Feb 09 '16 at 01:07
  • Okay, then you're asking the wrong question - you need to look at what curl does (performs an HTTP request - typically a GET - and returns the response) and then look up how to do that in Java. There are dozens, if not hundreds, of tutorials on how to download a file in Java. – childofsoong Feb 09 '16 at 01:09

0 Answers0