2012-11-17 52 views
0

當我查看nyt新聞提要xml時,它被渲染爲xhtml ..http://rss.nytimes.com/services/xml/rss/nyt/US.xml Is there一種方式我可以看到只是xml而不是xhtml來理解結構。查看xml代替xhtml NYT rss feed

回答

0

您列舉的鏈接IS XML。做一個「查看源代碼」:

<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet type='text/xsl' href='http://rss.nytimes.com/xsl/eng/rss.xsl'?> 
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> 
<channel> 
    <atom:link href="http://www.nytimes.com/services/xml/rss/nyt/US.xml" rel="self" type="application/rss+xml" /> 
    <title>NYT &gt; U.S.</title> 
    <link>http://www.nytimes.com/pages/national/index.html?partner=rss&amp;emc=rss</link> 
    <description>US</description> 
    <language>en-us</language> 
    <copyright>Copyright 2012 The New York Times Company</copyright> 
    <pubDate>Sat, 17 Nov 2012 03:50:41 GMT</pubDate> 
    <lastBuildDate>Sat, 17 Nov 2012 03:50:41 GMT</lastBuildDate> 
    <ttl>5</ttl> 
    <image><title>NYT &gt; U.S.</title> 
    <url>http://graphics8.nytimes.com/images/misc/NYT_logo_rss_250x40.png</url> 
    <link>http://www.nytimes.com/pages/national/index.html?partner=rss&amp;emc=rss</link> 
    </image> 
    <item> 
    <atom:link href="http://www.nytimes.com/2012/11/17/us/back-when-a-ring-ding-tasted-guiltily-like-america.html?partner=rss&amp;emc=rss" rel="standout" /> 
    <title>This Land: Back When a Ring Ding Tasted, Guiltily, Like America</title> 
    <link>http://www.nytimes.com/2012/11/17/us/back-when-a-ring-ding-tasted-guiltily-like-america.html?partner=rss&amp;emc=rss</link> 
    <description>Consumers already knew that not everything is good for you, and this was never truer than with a Twinkie, a Sno Ball or a Ring Ding — the Ding Dong equivalent in the Northeast.&lt;img width='1' height='1' src='http://rss.nytimes.com/c/34625/f/642562/s/25ac040b/mf.gif' border='0'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href="http://da.feedsportal.com/r/148659072988/u/353/f/642562/c/34625/s/25ac040b/a2.htm"&gt;&lt;img src="http://da.feedsportal.com/r/148659072988/u/353/f/642562/c/34625/s/25ac040b/a2.img" border="0"/&gt;&lt;/a&gt;&lt;img width="1" height="1" src="http://pi.feedsportal.com/r/148659072988/u/353/f/642562/c/34625/s/25ac040b/a2t.img" border="0"/&gt;</description> 
    <category domain="http://www.nytimes.com/namespaces/keywords/nyt_org_all">Hostess Brands</category> 
    <category domain="http://www.nytimes.com/namespaces/keywords/mdes">Food</category> 
    ...