title: XMLPullParser getName() returns null
body: <p>I am trying to parse openweathermap api <code>http://api.openweathermap.org/data/2.5/weather?q=London&amp;mode=xml</code>. I am using KXmlParser via XmlPullParserFactory.newPullParser() but the XMLPullParser.getName() is always returning null. It might be some silly mistake but it seems that I might need your help to see it.</p>
  
  <p>Here's the code to read the api via <code>HTTPURLConnection</code>.</p>
  
  <pre><code> URL url = new URL(urlString);
                  URLConnection urlConnection = url.openConnection();
                  HttpURLConnection httpConnection = (HttpURLConnection) urlConnection;
                  httpConnection.setRequestMethod("GET");
                  httpConnection.connect();
                  if(httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK){
                      inputStream = httpConnection.getInputStream();
                  }
  </code></pre>
  
  <p>I used </p>
  
  <pre><code>BufferedReader buffer = new BufferedReader(
                              new InputStreamReader(inputStream));
                      String s="";
                      while ((s=buffer.readLine())!=null){
                          stringBuffer.append(s);
                          System.out.println(s);
                      }
  </code></pre>
  
  <p>to make sure that I am reading the xml successfully and it turns out that the code is running properly. Next, I am using the following code parse the xml</p>
  
  <pre><code>XmlPullParserFactory xmlFactoryObject = XmlPullParserFactory.newInstance();
              XmlPullParser myparser = xmlFactoryObject.newPullParser();
  
              myparser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES
                      , false);
              myparser.setInput(inputStream, null);
  
              int event = myparser.getEventType();
  
              while (event != XmlPullParser.END_DOCUMENT){
                  Log.d("XMLPullParserHandler", "sdfdsf " + myparser.getName());
                  String name = myparser.getName();
  </code></pre>
  
  <p>But I am getting java.lang.NullPointerException at myparser.getName(); also the above log is showing "sdfdsf null".</p>
  
  <p>What am I doing wrong?</p>