C# SyndicationFeed AttributeExtensions命名空间前缀
我正在向RSS提要添加一些自定义iTunes播客标签C# SyndicationFeed AttributeExtensions命名空间前缀,c#,.net,rss,syndication,C#,.net,Rss,Syndication,我正在向RSS提要添加一些自定义iTunes播客标签 feed.AttributeExtensions.Add(new XmlQualifiedName(itunesPrefix, "http://www.w3.org/2000/xmlns/"), itunesNs); var extensions = feed.ElementExtensions; extensions.Add(new SyndicationElem
feed.AttributeExtensions.Add(new XmlQualifiedName(itunesPrefix,
"http://www.w3.org/2000/xmlns/"), itunesNs);
var extensions = feed.ElementExtensions;
extensions.Add(new SyndicationElementExtension("category", itunesNs, "Business"));
var categoryElem = XName.Get("category", itunesNs);
extensions.Add(
new XElement(categoryElem,
new XAttribute("text", "Sports & Recreation"),
new XElement(categoryElem,
new XAttribute("text", "Amateur")
)
).CreateReader()
);
输出为:
<itunes:category>Business</itunes:category>
<category text="Sports &amp; Recreation" xmlns="http://www.itunes.com/dtds/podcast-1.0.dtd">
<category text="Amateur">
</category>
</category>
你知道我发现最简单的方法是正常创建,然后使用Feedburner将其提交到iTunes并使iTunes兼容。你知道我发现最简单的方法是正常创建,然后使用Feedburner将其提交到iTunes并使iTunes兼容。我也有同样的问题,你找到解决办法了吗?我也有同样的问题,你找到解决办法了吗?
<itunes:category text="Sports &amp; Recreation">
<itunes:category text="Amateur">
</itunes:category>
</itunes:category>