public void findFeeds() { String href = new String(); String str = new String(); // Solange noch Text kommt while (in.hasNext()) { str = in.next(); // Link Tag gefunden if (str.equals("<link")) { // Noch nicht das Ende erreicht while (!(str.contains(">"))) { str = in.next(); // Typ-Attribut gefunden und Typ ist RSS if (str.contains("type") && (str.contains("application/rss+xml") || str .contains("application/rss"))) { // Nach href-Attribut suchen while (!(str.contains(">"))) { str = in.next(); // Feed in Liste einfuegen if (str.contains("href")) { if (str.contains("/>")) href = str.substring(6, str.length() - 3); else href = str.substring(6, str.length() - 1); feeds.add(new String(href)); } } } // href-Attribut vor Type gefunden if (str.contains("href")) { href = str.substring(6, str.length() - 1); // Type-Atrribut suchen while (!(str.contains(">"))) { str = in.next(); // Type mit passendem Inhalt gefunden, Feed hinzufügen if (str.contains("type") && (str.contains("application/rss+xml") || str .contains("application/rss"))) feeds.add(new String(href)); } } } } } }