Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# SyndicationFeed AttributeExtensions命名空间前缀_C#_.net_Rss_Syndication - Fatal编程技术网

C# SyndicationFeed AttributeExtensions命名空间前缀

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

我正在向RSS提要添加一些自定义iTunes播客标签

        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;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;amp; Recreation">
  <itunes:category text="Amateur">
  </itunes:category>
</itunes:category>