日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

[Web开发] 微软的RSS协议扩展 - FeedSync 介绍 (2)

發布時間:2025/3/17 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [Web开发] 微软的RSS协议扩展 - FeedSync 介绍 (2) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
下面通過一個例子來解釋 FeedSync 協議。 該例子講述當沒有數據一致性沖突發生的的時候,FeedSync 如何工作。 這是一個簡單基于RSS協議的XML, 描述我今天的任務列表。 <?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
? <channel>
??? <title>todolist.xml</title>
??? <description>Sample to do list</description>
??? <link>http://www.example.com/index.html</link>
??? <item>
????? <title>Pay Bills</title>
????? <description>Electric, Gas and Water Bills</description>
??? </item>
? </channel>
</rss> FeedSync 擴展在<item>下面加入了<sx:sync> 標簽 以及 <sx:history> 標簽 <?xml version="1.0"?>
<rss version="2.0" xmlns:sx="http://feedsync.org/2007/feedsync">
??? <channel>
??????? <title>todolist.xml</title>
??????? <description>Sample to do list</description>
??????? <link>http://www.example.com/index.html</link>
??????? <item>
??????????? <sx:sync id="101" updates="1" deleted="false" noconflicts="false">
??????????????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="fsRSSConvert.js"/>
??????????? </sx:sync>
??????????? <title>Pay Bills</title>
??????????? <description>Electric, Gas and Water Bills</description>
??????? </item>
??? </channel>
</rss> 假設我有2臺電腦(臺式機和筆記本), 在臺式電腦A 上我增加了“Buy groceries” 以及“Get car serviced” 任務項; 過了一會兒,我又在筆記本電腦B 上我增加了“Return books to library”以及“Get birthday gift for mother” 任務項。? 這時,臺式電腦A上的的XML 文件變成了 <item>
????? <sx:sync id="101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="fsRSSConvert.js"/>
????? </sx:sync>
????? <title>Pay Bills</title>
????? <description>Electric, Gas and Water Bills</description>
??? </item>
??? <item>
????? <sx:sync id="ep1.100" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="A"/>
????? </sx:sync>
????? <title>Buy groceries</title>
????? <description>Get milk and eggs</description>
??? </item>
??? <item>
????? <sx:sync id="ep1.101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="A"/>
????? </sx:sync>
????? <title>Get car serviced</title>
????? <description>Needs oil change</description>
??? </item>
筆記本電腦B上的XML 文件就是 <item>
????? <sx:sync id="101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="fsRSSConvert.js"/>
????? </sx:sync>
????? <title>Pay Bills</title>
????? <description>Electric, Gas and Water Bills</description>
??? </item>
??? <item>
????? <sx:sync id="ep2.100" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="B"/>
????? </sx:sync>
????? <title>Return books to library</title>
????? <description>2 books in total</description>
??? </item>
??? <item>
????? <sx:sync id="ep2.101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="B"/>
????? </sx:sync>
????? <title>Get birthday gift for mother</title>
????? <description>She likes blue flowers</description>
??? </item>
當兩個電腦都做數據同步之后,通過FeedSync協議,服務器上將會對兩個XML進行合并,最終形成 <item>
????? <sx:sync id="101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="fsRSSConvert.js"/>
????? </sx:sync>
????? <title>Pay Bills</title>
????? <description>Electric, Gas and Water Bills</description>
??? </item>
??? <item>
????? <sx:sync id="ep1.100" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:11Z" by="A"/>
????? </sx:sync>
????? <title>Buy groceries</title>
????? <description>Get milk and eggs</description>
??? </item>
??? <item>
????? <sx:sync id="ep1.101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="A"/>
????? </sx:sync>
????? <title>Get car serviced</title>
????? <description>Needs oil change</description>
??? </item>
??? <item>
????? <sx:sync id="ep2.100" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="B"/>
????? </sx:sync>
????? <title>Return books to library</title>
????? <description>2 books in total</description>
??? </item>
??? <item>
????? <sx:sync id="ep2.101" updates="1" deleted="false" noconflicts="false">
??????? <sx:history sequence="1" when="2007-11-29T06:27:12Z" by="B"/>
????? </sx:sync>
????? <title>Get birthday gift for mother</title>
????? <description>She likes blue flowers</description>
??? </item>

總結

以上是生活随笔為你收集整理的[Web开发] 微软的RSS协议扩展 - FeedSync 介绍 (2)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。