*
* @param rssRoot the root element of the RSS document to parse.
* @return the parsed Channel bean.
*/
protected WireFeed parseChannel(Element rssRoot) {
Channel channel = (Channel) super.parseChannel(rssRoot);
Element eChannel = rssRoot.getChild("channel",getRSSNamespace());
Element e = eChannel.getChild("language",getRSSNamespace());
if (e!=null) {
channel.setLanguage(e.getText());
}
e = eChannel.getChild("rating",getRSSNamespace());
if (e!=null) {
channel.setRating(e.getText());
}
e = eChannel.getChild("copyright",getRSSNamespace());
if (e!=null) {
channel.setCopyright(e.getText());
}
e = eChannel.getChild("pubDate",getRSSNamespace());
if (e!=null) {
channel.setPubDate(DateParser.parseDate(e.getText()));
}
e = eChannel.getChild("lastBuildDate",getRSSNamespace());
if (e!=null) {
channel.setLastBuildDate(DateParser.parseDate(e.getText()));
}
e = eChannel.getChild("docs",getRSSNamespace());
if (e!=null) {
channel.setDocs(e.getText());
}
e = eChannel.getChild("docs",getRSSNamespace());
if (e!=null) {
channel.setDocs(e.getText());
}
e = eChannel.getChild("managingEditor",getRSSNamespace());
if (e!=null) {
channel.setManagingEditor(e.getText());
}
e = eChannel.getChild("webMaster",getRSSNamespace());
if (e!=null) {
channel.setWebMaster(e.getText());
}
e = eChannel.getChild("skipHours");
if (e!=null) {
List skipHours = new ArrayList();
List eHours = e.getChildren("hour",getRSSNamespace());
for (int i=0;i<eHours.size();i++) {
Element eHour = (Element) eHours.get(i);
skipHours.add(new Integer(eHour.getText().trim()));
}
channel.setSkipHours(skipHours);
}
e = eChannel.getChild("skipDays");
if (e!=null) {
List skipDays = new ArrayList();
List eDays = e.getChildren("day",getRSSNamespace());
for (int i=0;i<eDays.size();i++) {
Element eDay = (Element) eDays.get(i);
skipDays.add(eDay.getText().trim());
}
channel.setSkipDays(skipDays);
}
return channel;
}