Java Tutorial/JSTL/RSS
Use JSTL to Deal with RSS
<source lang="java">
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.ru/jstl/xml" prefix="x" %> <html>
<head> <title>Reading RSS</title> </head> <body> <c:import var="news" url="http://www.wired.ru/news_drop/netcenter/netcenter.rdf" /> <x:parse var="doc" xml="${news}" />
<x:out select="$doc/rss/channel/title" /> |
<x:out select="$doc/rss/channel/description" /> |