ruby, , , XML (, - <coordinate use='errorbar'>1,2</coordinate> [ ruby script]), android, :
public static String[] download(String web_url) throws IOException{
URL website = new URL(web_url);
BufferedReader in = new BufferedReader(
new InputStreamReader(
website.openStream()));
String input;
ArrayList<String> stringList = new ArrayList<String>();
while ((input = in.readLine()) != null) {
stringList.add(input);
}
String[] itemArray = new String[stringList.size()];
String[] returnedArray = stringList.toArray(itemArray);
return returnedArray;
}
This will give you XML output, each line will be like a record in an array, and then you just need to parse the XML. If you are sure that you do not need additional data, you can simply send it in plain text, without having to parse the XML.
source
share