title: Trouble parsing some RSS feeds using Java and Sax
body: <p>I've written an RSS feed parser in Java (running on Android) and it parses some feeds perfectly, and others not at all.  I get the following error when it tries to parse Slashdot (<a href="http://rss.slashdot.org/Slashdot/slashdot" rel="nofollow noreferrer">http://rss.slashdot.org/Slashdot/slashdot</a>)</p>
  
  <pre><code>org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: unbound prefix
  </code></pre>
  
  <p>If I try to parse Wired (<a href="http://feeds.wired.com/wired/index" rel="nofollow noreferrer">http://feeds.wired.com/wired/index</a>)</p>
  
  <pre><code>org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: syntax error
  </code></pre>
  
  <p>If I try to parse AndroidGuys (<a href="http://feeds.feedburner.com/androidguyscom" rel="nofollow noreferrer">http://feeds.feedburner.com/androidguyscom</a>)</p>
  
  <pre><code>org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: syntax error
  </code></pre>
  
  <p>Here is some code for my parser.</p>
  
  <pre><code>public void updateArticles(Context ctx, Feed feed, int numDaysToGet) {
      try {
          targetFlag = TARGET_ARTICLES;
          tweetDB = new TweetMonsterDBAdapter(ctx);
          tweetDB.open();
          currentFeed = feed;
          TimeZone.setDefault(TimeZone.getTimeZone("UTC"));  // or "Etc/GMT-1"
  
          Date currentDate = new Date();
          long dateInMillis = currentDate.getTime();
          oldestDate.setTime(dateInMillis-(dayInMillis*numDaysToGet));
  
          SAXParserFactory spf = SAXParserFactory.newInstance();
          SAXParser sp = spf.newSAXParser();
          XMLReader xr = sp.getXMLReader();
          xr.setContentHandler(this);
          xr.parse(new InputSource(currentFeed.url.openStream()));
  
      } catch (IOException e) {
          Log.e("TweetMonster", e.toString());
      } catch (SAXException e) {
          tweetDB.close();
          Log.e("TweetMonster", e.toString());
      } catch (ParserConfigurationException e) {
          Log.e("TweetMonster", e.toString());
      }
      tweetDB.close();
  }
  </code></pre>
  
  <p>It doesn't even get into my startElement method.</p>