Hi! I'm using Drupal 7 and exporting an RSS feed using the Views module.

So far, so good. It exports everything I need (I think). However, I need to change one of the labels. I need to change <description> to <content>. How do I do that? I haven't found any modules or workarounds yet.

<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.example.com/rss-facebook-instant-articles.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
    <title>RSS Facebook Instant Articles</title>
     <atom:link href="https://www.example.com/admin/structure/views/nojs/preview/rss_facebook_instant_articles/feed?live_preview=1&amp;_triggering_element_name=op&amp;_triggering_element_value=Update%20preview" rel="self" type="application/rss+xml" />
    <title>New sitcom</title>
    <description>All HTML text for my article.
     <pubDate>Tuesday, February 13, 2018 - 12:00</pubDate>
 <dc:creator>Author Name</dc:creator>
 <guid isPermaLink="false" />

The format's alright, but it's just the name of <description> I need to change to <content> so I can import it to Facebook Instant Articles.

Any idea how this can be done? I've looked around at a few different modules, but I couldn't find any which accomplished this. I think I looked at every RSS setting in the admin panel three times. Maybe there's a way to change it in the code?


VM’s picture


Further google digging led  me to http://www.timtoon.com/2009/05/27/customizing-an-rss-feed-using-drupal-a... which may aid in getting you where you need to go albeit with custom code.  Scratch that it was for D6, though may still provide some usefulness with reference to path forward.

bdparker’s picture

I'm attempting to do a field rewrite using a bunch of tokens I generate in my Fields area. I hide all the other fields but use the last one to display all my variables. It's working... sort of. It still puts everything in a <description> tag no matter what I label it and I'm also trying to put the data in a <something> tag, but they keep getting erased in my preview.

Think I'm on the right track here, or will this not work? I'm new to this so I test a lot of different paths, and if I hit a dead end, I try another. Your input may save me some time!