我有这段代码来解析 RSS 提要,但由于某种原因,我对 itemDownLink 的捕获从未触发。有人可以解释为什么吗?
public Channel parse(InputStream is) {
RootElement root = new RootElement("rss");
Element chanElement = root.getChild("channel");
Element chanTitle = chanElement.getChild("title");
Element chanLink = chanElement.getChild("link");
Element chanDescription = chanElement.getChild("description");
Element chanLastBuildDate = chanElement.getChild("lastBuildDate");
Element chanDocs = chanElement.getChild("docs");
Element chanLanguage = chanElement.getChild("language");
Element chanItem = chanElement.getChild("item");
Element itemTitle = chanItem.getChild("title");
Element itemDescription = chanItem.getChild("description");
Element itemLink = chanItem.getChild("link");
Element itemDate = chanItem.getChild("pubDate");
Element itemDownLink = chanItem.getChild("feedburner:origEnclosureLink");
}
这是捕手:
itemDownLink.setEndTextElementListener(new EndTextElementListener() {
public void end(String body) {
item.setDownloadLink(body);
}
});