<?xml version="1.0" encoding="utf-8" ?>

- <lists title="CGNTV LIVE LIST" updatetime="201104071230">
- <item name="korea">
- <connect_type name="3g">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livestream_vod.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livestream_vod.sdp/playlist.m3u8</m3u8>
  </connect_type>
- <connect_type name="wifi">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livestream_vod.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livestream_vod.sdp/playlist.m3u8</m3u8>
  </connect_type>
  </item>
- <item name="japan">
- <connect_type name="3g">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livejapan.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livejapan.sdp/playlist.m3u8</m3u8>
  </connect_type>
- <connect_type name="wifi">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livejapan.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livejapan.sdp/playlist.m3u8</m3u8>
  </connect_type>
  </item>
- <item name="china">
- <connect_type name="3g">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livechina.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livechina.sdp/playlist.m3u8</m3u8>
  </connect_type>
- <connect_type name="wifi">
  <rtsp>rtsp://121.189.59.238:554/cgntvlive/livechina.sdp</rtsp>
  <m3u8>http://121.189.59.238:554/cgntvlive/livechina.sdp/playlist.m3u8</m3u8>
  </connect_type>
  </item>
  </lists>

이게 XML 이구요 저기 보면 <rtsp> 에 들어있는 rtsp://121.189.59.238:554/cgntvlive/livechina.sdp 이걸 String 에 집어넣으려고 하는데

XmlPullParser.START_TAG 부분에 들어가질 않네요 ㅠㅠㅠㅠ 제가 뭘 잘못한건지 알수 있을까요 ㅠㅠㅠㅠㅠ

 

try {
             URL url = new URL("http://m.cgntv.net/tv/live.xml");
       Log.d("!!!!", rtsp);
       //사전준비//
       XmlPullParserFactory parserFactory = XmlPullParserFactory.newInstance();
       XmlPullParser parser = parserFactory.newPullParser();
       parser.setInput(url.openStream(), "utf-8");
       /////////////////////////////////////////////////////////////////////////
       int parserEvent = parser.getEventType();
       String tag="ready..!";

       
       
       String url_url="";
       
       int i=0;
       boolean t=false;
       while(parserEvent != XmlPullParser.END_DOCUMENT){
        
        switch(parserEvent){
        
        case XmlPullParser.START_DOCUMENT:
              break;
         
        case XmlPullParser.START_TAG:         
         tag = parser.getName();
         
         if(tag.equals("rtsp")){
          t=true;
         }
         break;
        
        case XmlPullParser.TEXT:
         if(t){          
          url_url = parser.getText();
          rtsp = url_url;
          i++;
         }             
         break;
        
        case XmlPullParser.END_TAG:

         break;
        } 
        parserEvent = parser.next();
       }
       
      }
            catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       Log.d("parserTest","error");
      }