简体   繁体   中英

Parse feed java

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM