Import XML feed into Webflow?

Hello, can someone explain to me how to get an XLM feed in Webflow and then styled it? As an example a feed: http://lb.50g.nl/xml/cc4cade01cc5565c1d5efc6e7ee97ac4.xml

1 Like

Hello @Erwin

I think there’s no way to import an xml feed. You need to use a CSV file. I’ve found this > XML to CSV Converter Online tool to Convert XML to CSV maybe will work.

I tried the tool and you can see the CSV output here > codebeautify - Google Sheets

CSV import > Import CSV content to the Webflow CMS | Webflow Features

Hope this helps

Piter :webflow_heart:

Hello @PeterDimitrov

Thanks for replying! The fact that it is a web service means that it all goes automatic. All the news messages will be collected by my ‘scraper’, 24/7. This also works in my apps. If there is a automatic solution to convert xml to CSV, that will be fine. Otherwise Iet will not work. Perhaps with the help of Zapier?

1 Like

Not sure if this is the right one, but as far as I know rss are in xml > Create Webflow CMS items from new RSS items

Are you trying to import the data and create CMS entries (stored data) or do you need to just consume the XML feed and display it to a visitor on your site? The reason I ask is if it already exists somewhere else, why not just display it. You could do that with JQuery.

Hello @webdev,

This is the plan (see sketch). How do I accomplish this in Webflow. As you see, the feed has no styling. Just plain text. So I need to do that in Webflow.

@PeterDimitrov
I’ve tried the Zapier to webflow. Zapier can’t read my xml-feed, but with a rss-feed I got some results. But if I managed this to connect to my collection, how does the publishing of these articles goes? I mean, does Webflow support ‘Autopublishing’ ?

1 Like

Assuming you can load the feed via jQuery.ajax(). which I can’t because the Access-Control-Allow-Origin header is set. You could iterate over each item in the xml file, set variables with the data, append them to an element, and style the contents with a style declaration in the page custom code.

  $("#myfeed").append("<ul class='feed-items'></ul>");
  $.ajax({
    type: "GET",
    url: "data.xml",
    dataType: "xml",
    success: function(xml){
    $(xml).find('item').each(function(){
      var title = $(this).find('header').text();
      var description = $(this).find('description').text();
      var thumb = $(this).find('thumb').text();

      $("<li class='feed-item'></li>").html("<header>" + title + "</header>" + "<img src='" + thumb + "'/>" + "<div class='feed-desc'>" + description + "</div>").appendTo("#myfeed ul");

    });
  },
  error: function() {
    alert("An error occurred while processing XML file.");
  }
  });
});
`
2 Likes

Hello,

I think yes. Zapier description > whenever a new RSS item appears in your feed, you can automatically generate new CMS items in Webflow

You need to use CREATE LIVE ITEM. Zapier description > Create Live Item > Adds a new item to a given collection on your published site.

Check also @webdev suggestions

Piter :webflow_heart:

Just a note:

If you’re consuming a feed, best to use RSS, so that the structure is well defined. If you are pulling some custom XML or JSON in, and you are not the source, it can change. Also if someone publishes an RSS feed, you won’t get blocked from consuming it.

@webdev @PeterDimitrov Hi there, I’m new to RSS feeds and am trying to understand how Webflow RSS works. In the example above from Erwin, how was he able to get the description HTML field into his xml. Is this a custom xml? If so, how can that be added to Webflow?

I was able to paste the html code in the description field of the Webflow RSS but it is not an ideal workflow.

One more question, how does one get a dynamic audio player (Udesly) to play directly in the RSS feed? Is that possible? Or is there another player that would work? Does this require a custom XML?

Any help would be greatly appreciated! Thank you.

Hi Erwin, did you finally find a solution to show the XML feed?