Subversion Repositories bacoAlunos

Rev

Rev 1306 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.rss;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.JAXBException;
import javax.xml.bind.JAXBElement;


public class Main
{

         public static void main (1.5.0/docs/api/java/lang/String.html">String [] args) throws JAXBException {
             1.5.0/docs/api/javax/naming/spi/ObjectFactory.html">ObjectFactory o = new 1.5.0/docs/api/javax/naming/spi/ObjectFactory.html">ObjectFactory();
             TRss tRss = o.createTRss();
             tRss.setChannel(o.createTRssChannel());
             tRss.getChannel().getTitleOrLinkOrDescription().add(o.createTRssChannelLanguage("por"));
             JAXBContext context = JAXBContext.newInstance("pt.estgp.rss");
              Marshaller marshaller = context.createMarshaller();

              TRssItem item  = o.createTRssItem();
             item.getTitleOrDescriptionOrLink().add(o.createTRssItemAuthor("susana"));
             tRss.getChannel().getItem().add(item);
              marshaller.marshal(o.createRss(tRss), 1.5.0/docs/api/java/lang/System.html">System.out);
         }


}