Rome Library to read feeds Java

一曲冷凌霜 提交于 2019-12-08 08:32:58

问题


Hey people, i need to read the jpg url of this feed...:

    <author>asunderland@clubamerica.com.mx (Comunicación Club América)</author>
    <description><![CDATA[Conoce la historia de este guardameta americanista]]></description>
    <pubDate>Thu, 03 Jun 2010 01:06:23 CDT</pubDate> 
            <media:content url='http://i2.esmas.com/2009/09/06/69848/navarrete-300x150.jpg'/>
    <media:thumbnail url=''/>
    <content:encoded>

But this java library don't give me the function for get "media:content url='http://i2.esmas.com/2009/09/06/69848/navarrete-300x150.jpg', anyone can help me?? I already read this data: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SyndEntry entrada = it.next();
String title=(entrada.getTitle() );
String link=(entrada.getLink());
String author=(entrada.getAuthor());
String description=(""+entrada.getDescription() );
Date date=(entrada.getPublishedDate());
String date2= date.toString();
String content=(""+entrada.getContents());

Some idea folks???Thank u..


回答1:


There is a Rome extension for MediaRSS, a short descripton what jars are needed can be found at usage of rome media rss plugin and http://wiki.java.net/bin/view/Javawsxml/MediaRSS

The following code is untestet since I have only used rome to create a feed containing MediaRSS:

// SyndEntry entry = ...
MediaEntryModule mod = (MediaEntryModule) entry.getModule(MediaEntryModule.URI);
UrlReference ref = (UrlReference) mod.getMediaContents()[0].getReference();
URL url = ref.getUrl();



回答2:


Try the SyndEntry#getForeignMarkup()



来源:https://stackoverflow.com/questions/2977422/rome-library-to-read-feeds-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!