简体   繁体   中英

Rss Feed Java MVC

i would like to create some RSS Feeds for my website. I managed to crate the XML file but

How do i display it in a nice format like

http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml

and how do i crate the little icon in the url box?

by the way my XML file looks like

    <?xml version='1.0' encoding='UTF-8'?>
<rss version="2.0">
    <channel>
        <title>title</title>
        <description>desciption</description>
        <link>LINK</link>
        <dateCreated>2010-05-31 00:00:00.0</dateCreated>
        <language>Italian</language>
        <item>
            <title>pojpoj</title>
            <description>pojpojpoj</description>
            <link>ojpojpoj</link>
            <dateCreated>2010-06-03 00:00:00.0</dateCreated>
            <pubDate>2010-06-03 00:00:00.0</pubDate>
        </item>
        <item>
            <title>dfojp</title>
            <description>pojpojpoj</description>
            <link>pojpoj</link>
            <dateCreated>2010-06-03 00:00:00.0</dateCreated>
            <pubDate>2010-06-03 00:00:00.0</pubDate>
        </item>
    </channel>
</rss>

Thanks

The BBC feed in question is using an XSL stylesheet to transform the XML -> HTML when your browser displays it.

From the feed:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/shared/bsp/xsl/rss/nolsol.xsl"?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM