I´m using rome.jar to parse Wordpress feed with java like this:
public class RSSReader {
public static void main(String[] args) throws Exception {
URL url = new URL("http://ayudawp.com/feed/");
XmlReader reader = null;
try {
reader = new XmlReader(url);
SyndFeed feed = new SyndFeedInput().build(reader);
for (Iterator i = feed.getEntries().iterator(); i.hasNext();) {
SyndEntry entry = (SyndEntry) i.next();
System.out.println(entry.getTitle());
System.out.println(entry.getDescription());
System.out.println(entry.getContents());
System.out.println(entry.getPublishedDate());
}
} finally {
if (reader != null)
reader.close();
}
}
}
but when I do the System.out.println of the entry.getContent() I don´t see all the content of the new. Any solution please? My feed code has format
I have find a better solution to parse feed:
http://oneplaceinfo.wordpress.com/2012/02/22/java-code-to-parse-the-rss-feed-for-any-wordpress-blog/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.