Package com.hascode.tutorial.xbeam

Source Code of com.hascode.tutorial.xbeam.RssFeedParsing

package com.hascode.tutorial.xbeam;

import java.io.IOException;

import org.xmlbeam.XBProjector;

import com.hascode.tutorial.xbeam.projection.Rss;

public class RssFeedParsing {
  public static void main(final String[] args) throws IOException {
    System.out.println("loading rss feed..");
    Rss rss = new XBProjector().io().url("http://www.hascode.com/feed/").read(Rss.class);

    System.out.println("rss feed received - channel: " + rss.channel().title());
    rss.channel().items().forEach(i -> {
      System.out.println("title: " + i.title() + ", link: " + i.link());
    });
  }
}
TOP

Related Classes of com.hascode.tutorial.xbeam.RssFeedParsing

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.