import java.net.*;
import java.io.*;
import java.util.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
public class TeateOtsingXMLSort{
public static void main(String argumendid[]) throws Exception{
String aadress="http://maps.google.com/maps/geo?output=xml&q="+argumendid[0];
String volinikuaadress="cache.tlu.ee";
String volinikuvarat="3128";
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", volinikuaadress);
System.getProperties().put("proxyPort", volinikuvarat);
BufferedReader sisse=new BufferedReader(
new InputStreamReader(new URL(aadress).openStream())
);
String rida=sisse.readLine();
int algus=rida.indexOf("");
int ots=rida.indexOf("");
String abi=rida.substring(algus+13, ots);
System.out.println(abi);
String[] arvud=abi.split(",");
aadress="http://search.twitter.com/search.atom?geocode="+arvud[1]+","+arvud[0]+",10km";
System.out.println(aadress);
Document d=DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(aadress);
NodeList ed=d.getElementsByTagName("entry");
LinkedList hoidla=new LinkedList();
for(int i=0; i it=hoidla.listIterator(); it.hasNext();){
TwKirje k=it.next();
System.out.println(k.nimi+" "+k.aeg+" "+k.sisu);
}
}
}