0

RSS アイテムの要素を並べ替える簡単な方法があるかどうか疑問に思っています。手動でシリアル化できると思いますが、もっと簡単なものがあるかどうか疑問に思っています。

.NET は次のようにシリアル化します。

<item>
<link>http://mmu.ac.uk/library.aspx</link>
<title>URGENT Library information: borrowing facilities withdrawn</title>
<description/>
</item>

これが別の順序になることを期待するJQueryニュースティッカーを使用しています

<item>
<title>URGENT Library information: borrowing facilities withdrawn</title>
<description/>
<link>http://mmu.ac.uk/library.aspx</link>
</item>

ありがとう、アレックス

4

1 に答える 1

1

派生した「MyRss20FeedFormatter」クラスの WriteItem メソッドをオーバーライドして、syndicationItems データが出力ストリームに書き込まれる順序を変更できます。

http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.rss20feedformatter.writeitem.aspx

于 2012-05-15T11:13:36.040 に答える