Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.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
Image 有人能告诉我为什么我的图像没有显示在我的rss提要上吗?_Image_Rss - Fatal编程技术网

Image 有人能告诉我为什么我的图像没有显示在我的rss提要上吗?

Image 有人能告诉我为什么我的图像没有显示在我的rss提要上吗?,image,rss,Image,Rss,下面是它是如何创建的。除了图像,一切都正常 foreach (var blog in blogs) { xtwFeed.WriteStartElement("item"); xtwFeed.WriteElementString("title", blog.Title + " by " + blog.Name); xtwFeed.WriteElementString("link",blog.BlogURL);

下面是它是如何创建的。除了图像,一切都正常

 foreach (var blog in blogs)
        {
            xtwFeed.WriteStartElement("item");
            xtwFeed.WriteElementString("title", blog.Title + " by " + blog.Name);
            xtwFeed.WriteElementString("link",blog.BlogURL);
            xtwFeed.WriteElementString("description", blog.OutputMessage);
            //if(!string.IsNullOrEmpty(blog.PictureURL))
            //{
                xtwFeed.WriteStartElement("image");
                xtwFeed.WriteElementString("url", blog.PictureURL);
                xtwFeed.WriteElementString("title", "image");
                xtwFeed.WriteElementString("link", blog.BlogURL);
                xtwFeed.WriteElementString("width", "144");
                xtwFeed.WriteElementString("height", "250");
                xtwFeed.WriteEndElement();
           // }

在RSS2.0中,频道可以有图像,但项目不能。如果你想把一个图像放在一个项目中,你必须把你的描述变成HTML,并使用一个img标签

就个人而言,我不喜欢项目描述中的HTML,但那只是我自己,我更喜欢纯文本