return channel;
}
@Override
protected Item parseItem(final Element rssRoot, final Element eItem, final Locale locale) {
final Item item = super.parseItem(rssRoot, eItem, locale);
final Element eSource = eItem.getChild("source", getRSSNamespace());
if (eSource != null) {
final Source source = new Source();
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final String url = eSource.getAttributeValue("url");
source.setUrl(url);
source.setValue(eSource.getText());
item.setSource(source);
}
// 0.92 allows one enclosure occurrence, 0.93 multiple just saving to write some code.
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final List<Element> eEnclosures = eItem.getChildren("enclosure");
if (!eEnclosures.isEmpty()) {
final List<Enclosure> enclosures = new ArrayList<Enclosure>();
for (final Element eEnclosure : eEnclosures) {
final Enclosure enclosure = new Enclosure();
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final String url = eEnclosure.getAttributeValue("url");
if (url != null) {
enclosure.setUrl(url);
}
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final String length = eEnclosure.getAttributeValue("length");
enclosure.setLength(NumberParser.parseLong(length, 0L));
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final String type = eEnclosure.getAttributeValue("type");
if (type != null) {
enclosure.setType(type);
}
enclosures.add(enclosure);
}
item.setEnclosures(enclosures);
}
// getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
final List<Element> categories = eItem.getChildren("category");
item.setCategories(parseCategories(categories));
return item;
}