@@ -0,0 +1,2787 @@
+package hexathon.kernil;%0A%0Aimport java.io.InputStream;%0Aimport java.net.URL;%0Aimport java.net.URLConnection;%0Aimport java.util.ArrayList;%0A%0Aimport javax.xml.parsers.DocumentBuilder;%0Aimport javax.xml.parsers.DocumentBuilderFactory;%0A%0Aimport org.w3c.dom.Document;%0Aimport org.w3c.dom.NodeList;%0A%0A/**%0A * Created by InJung on 2015. 5. 1..%0A */%0Apublic class Crawler %7B%0A    private String busDataUrl = %22http://apis.its.ulsan.kr:8088/Service4.svc/BusLocationInfo.xo?crypte=A&routeid=%22;%0A    private String%5B%5D busCompanys = %7B %2219210%22, %2219410%22, %2219610%22 %7D;%0A    private static Crawler crawler = null;%0A%0A    public static Crawler getInstance() %7B%0A        if (crawler == null) %7B%0A            crawler = new Crawler();%0A        %7D%0A%0A        return crawler;%0A    %7D%0A%0A    public ArrayList%3CBus%3E getBusData(int _busNo, int _direction) %7B%0A        ArrayList%3CBus%3E busList = new ArrayList%3CBus%3E();%0A%0A        try %7B%0A            for (String company : busCompanys) %7B%0A                String dataUrl = busDataUrl + company + _busNo + _direction;%0A                URL url = new URL(dataUrl);%0A                URLConnection connection = url.openConnection();%0A%0A                Document doc = parseXML(connection.getInputStream());%0A                NodeList nameNodes = doc.getElementsByTagName(%22BUSNO%22);%0A                NodeList stopNodes = doc.getElementsByTagName(%22STOPNAME%22);%0A                NodeList xNodes = doc.getElementsByTagName(%22BUSX%22);%0A                NodeList yNodes = doc.getElementsByTagName(%22BUSY%22);%0A%0A                NodeList cntNodes = doc.getElementsByTagName(%22BUSCNT%22);%0A                int busCount = Integer.parseInt(cntNodes.item(0).getTextContent());%0A%0A                if (busCount == 0) continue;%0A%0A                for (int i = 0; i %3C busCount; i++) %7B%0A                    busList.add(new Bus(%0A                            _busNo,%0A                            _direction,%0A                            nameNodes.item(i).getTextContent(),%0A                            stopNodes.item(i).getTextContent(),%0A                            Double.parseDouble(xNodes.item(i).getTextContent()),%0A                            Double.parseDouble(yNodes.item(i).getTextContent())));%0A                %7D%0A            %7D%0A        %7D catch (Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        return busList;%0A    %7D%0A%0A    private Document parseXML(InputStream stream) %7B%0A        DocumentBuilderFactory objDocumentBuilderFactory = null;%0A        DocumentBuilder objDocumentBuilder = null;%0A        Document doc = null;%0A        try %7B%0A            objDocumentBuilderFactory = DocumentBuilderFactory.newInstance();%0A            objDocumentBuilder = objDocumentBuilderFactory.newDocumentBuilder();%0A%0A            doc = objDocumentBuilder.parse(stream);%0A        %7D catch(Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        return doc;%0A    %7D%0A%7D

Add Crawler class