Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java RSS ʵÏÖ£¨ÁÐ×Ó£©

Ò»£º RSS½éÉÜ
¸ù¾Ýά»ù°Ù¿Æ(http://zh.wikipedia.org/wiki/RSS)µÄ¶¨Ò壬“RSSÊÇÒ»ÖÖÓÃÓÚ¹²ÏíÐÂÎźÍÆäËûWebÄÚÈݵÄÊý¾Ý½»»»¹æ·¶ ”£¬ËüÊÇһϵÁеĹ淶µÄ×éºÏ£¬²ÉÓÃXML¸ñʽ¡£Ä¿Ç°¹úÄÚRSSÓ¦ÓÃ×î¶àµÄÊÇÔÚÐÂÎÅÍøÕ¾ºÍ²©¿ÍÍøÕ¾ÉÏ¡£
Ðí¶àÍøÕ¾¿ÉÒÔÓÃRSSÔĶÁÆ÷À´¸öÐÔ»¯×Ô¼ºµÄÍøÒ³£¬±ÈÈçÏÔʾ×îеÄÐÂÀËÐÂÎÅ£¬ÏÔʾ×Ô¼ººÃÅóÓÑ×îеIJ©¿ÍÎÄÕ£¬ÏÔʾ×îеÄGoogleÂÛ̳ÄÚÈÝ¡£³ý´ËÖ®Í⣬ÀûÓÃRSSÔĶÁÆ÷»¹¿ÉÒÔʵÏÖÆäËüÓÃ;£¬±ÈÈ磺
»ñµÃÌìÆøÔ¤±¨
½ÓÊÕÓʼþ£¬±ÈÈçGmail¾ÍÌṩRSS feed
»ñÈ¡×îйÉƱÐÐÇé
»ñÈ¡ÒôÀÖ£¬µç̨½ÚÄ¿ºÍÊÓƵ¼ô¼­µÈµÈ
¶þ£ºRome½éÉÜ
ÕâƪÎÄÕ²ÉÓÃRomeÕâ¸ö¿ªÔ´¹¤¾ßÀ´ÊµÏÖRSSÔĶÁÆ÷¡£RomeÖ§³ÖµÄ¸ñʽºÜ¶à£¬ÓÐRSS 0.90, RSS 0.91 Netscape, RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, Atom 1.0 µÈµÈ£¬¼¸ºõÄÒÀ¨ÁËÄ¿Ç°ËùÓеÄRSS ºÍatom°æ±¾¡£×îеÄRome°æ±¾¿ÉÒÔ´Óhttp://wiki.java.net/bin/view/Javawsxml/RomeÉϵõ½¡£
ʵÏÖRSSÔĶÁÆ÷£¬Ö÷Òª²ÉÓÃRomeµÄ½âÎö¹¦ÄÜ£¬¾ÍÊÇ´ÓXMLÎļþÖжÁ³öÏàÓ¦µÄÄÚÈÝ¡£ÎÒÓÃһЩ¼òµ¥´úÂëÀ´ËµÃ÷ÈçºÎʹÓÃRomeÖеÄÀàºÍ·½·¨¡£
URL feedUrl = new URL("http://rss.sina.com.cn/news/marquee/ddt.xml");
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(feedUrl));
 
±íÒ»: µÃµ½RSS Feed
“http://rss.sina.com.cn/news/marquee/ddt.xml“ÊÇÐÂÀËÐÂÎŵÄÒ»¸öRSS µØÖ·¡£Í¨¹ýÈýÐдúÂ룬¾Í¿ÉÒԵõ½Ò»¸ö¶ÔÓ¦Õâ¸öµØÖ·µÄRSS Feed¶ÔÏó¡£Õâ¸ö¶ÔÏó°üº¬ÎÒÃÇËùÐèÒªµÄËùÓÐRSSÄÚÈÝ¡£Èç¹ûÓÃSystem.out.println(feed)£¬»áµÃµ½±í¶þÖеĽá¹û¡£´ÓÖпÉÒÔÇå³þµØ¿´µ½ SyndFeedÀàµÄ½á¹¹¡£
SyndFeedImpl.contributors=null
SyndFeedImpl.title=ÐÂÎÅÖÐÐÄ-ÐÂÎÅÒªÎÅ
SyndFeedImpl.categories[0].name=
SyndFeedImpl.categories[0].taxonomyUri=null
SyndFeedImpl.link=http://news.sina.com.cn/iframe/o/allnews/input/index.htm
SyndFeedImpl.publishedDate=Thu Jun 22 13:20:01 CST 2006
SyndFeedImpl.entries[0].updatedDate=null
SyndFeedImpl.entries[0].contributors=null
SyndFeedImpl.entries[0].title=ÔúÍߺÕÀïÔÚ¼Ïñ´øÖкôÓõ°¢¸»º¹È˵ֿ¹Íâ¹úÇÖÂÔ
SyndFeedImpl.entries[0].categories[0].name=
SyndFeedImpl.entries[0].categories[0].taxonomyUri=null
SyndFeedImpl.entries[0].link=http://news.sina.com.cn/w/2006-06-22/11


Ïà¹ØÎĵµ£º

ÈÕÆÚÀà¼Ó¼õ¼°JavaÖÐÈÕÆÚÀà²Ù×÷Ëã·¨´óÈ«

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
1Calendar time=Calendar.getInstance();
2time.clear();
3time.set(Calendar.YEAR,year); //year Ϊ int
4time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0
5int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//±¾Ô·ݵÄÌìÊý
×¢£ºÔÚʹÓÃset·½·¨Ö®Ç°£¬±ØÐë ......

´ÓÓïÑÔÉý¼¶ÎªÆ½Ì¨£ºJAVAÀÏÒÓ£¬ÉÐÄÜ·¹·ñ£¿

JavaÔ´ÓÚ1991ÄêµÄÒ»¸ö»ú¶¥ºÐÏîÄ¿£¬²¢ÓÉSunÔÚ1995Äê·¢²¼ÁË1.0°æ±¾£¬µ½½ñÌìËãÏÂÀ´£¬Ò²ÒªÓÐ20ÄêµÄʱ¼äÁË¡£JDK1.3-->JDK1.4-->JDK5ÕâÁ½´Î°æ±¾Éý¼¶£¬Ê¹µÃjavaÓïÑԵõ½Á˼«´óµÄÍêÉÆ£¬µ«´ËºóµÄJDK6ºÍÉÐδÕýʽ·¢²¼µÄJDK7£¬²¢Î´¸øÈËÌ«¶àµÄ¾ªÏ²£¬ÖÁÉÙÎÒÊÇÕâÖָоõ¡£Æäʵ´Ó×î½ü¼¸ÄêJVM¼æÈÝÓïÑԵİٻ¨Æë·Å¾Í¿ÉÒÔ¿´³öÀ´¶ËÄߣºJAVAÔ ......

javaÓëÂÒÂë

UTF8ת»»³ÉGB2312 µ±ÎÒÃÇÔÚ»ùÓÚHTTPЭÒéµÄJSP»òServletµÄÓ¦ÓÃÖлñÈ¡Êý¾Ý»ò·¢ËÍÇëÇóʱ£¬JVM»á°ÑÊäË͵ÄÊý¾Ý±àÂë³ÉUTF8¸ñʽ¡£Èç¹ûÎÒÃÇÖ±½Ó´ÓHTTPÁ÷ÖÐÌáÈ¡ÖÐÎÄÊý¾Ý£¬ÌáÈ¡µÄ½á¹ûΪ“????”£¨¿ÉÄܸü¶àÎʺţ©£¬Îª×ª»»³ÉÎÒÃÇÄܹ»Àí½âµÄÖÐÎÄ×Ö·û£¬ÎÒÃÇÐèÒª°ÑUTF8ת»»³ÉGB2312£¬½èÖúISO-8859-1±ê×¼±àÂëÄܹ»ÇáÒ×µÄʵÏÖ¡£
ºº ......

JavaÖеĸ¡µãÊý·ÖÎö

JavaÖеĸ¡µãÊý·ÖÎö
¡¡¡¡¸¡µãÊý·ÖΪµ¥¾«¶ÈºÍË«¾«¶È,JavaÖеĵ¥¾«¶ÈºÍË«¾«¶È·Ö±ðΪfloatºÍdouble.ÄãÃÇÖªµÀfloatºÍdoubleÊÇÔõô´æ´¢µÄÂð?
¡¡¡¡floatÕ¼4¸ö×Ö½Ú,doubleÕ¼8¸ö×Ö½Ú,ΪÁË·½±ãÆð¼û,ÕâÀï¾ÍÖ»ÌÖÂÛfloatÀàÐÍ.
¡¡¡¡floatÆäʵºÍÒ»¸öintÐ͵ĴóСÊÇÒ»ÑùµÄ,Ò»¹²32λ,µÚһλ±íʾ·ûºÅ,2-9±íʾָÊý,ºóÃæ23λ±íʾСÊý²¿·Ö.ÕâÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ