2011-12-10 24 views
0

我是Atom feed的全新品牌。我想設置一個基本的飼料。我創建了哪些網址(並從我的應用程序中調用?)。我的Feed需要多少文件?也許只是像這樣含有xml的文檔:如何設置Atom 1.0提要?

<?xml version="1.0" encoding="utf-8"?> 

<feed xmlns="http://www.w3.org/2005/Atom"> 

     <title>Example Feed</title> 
     <subtitle>A subtitle.</subtitle> 
     <link href="http://example.org/feed/" rel="self" /> 
     <link href="http://example.org/" /> 
     <id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id> 
     <updated>2003-12-13T18:30:02Z</updated> 
     <author> 
       <name>John Doe</name> 
       <email>[email protected]</email> 
     </author> 

     <entry> 
       <title>Atom-Powered Robots Run Amok</title> 
       <link href="http://example.org/2003/12/13/atom03" /> 
       <link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/> 
       <link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/> 
       <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> 
       <updated>2003-12-13T18:30:02Z</updated> 
       <summary>Some text.</summary> 
     </entry> 

</feed> 

我需要一個額外的html文檔來引用包含xml數據的文檔嗎?

回答

1

答案就在你的問題:

只包含這樣的XML

聯合訂閱文檔是XML數據。您可以靜態(XML文件)或動態實現它們(例如,返回XML字符串的PHP腳本)。

繼續,你在正確的軌道上。