Processing an XML feed into a web page on RW

Help! I am looking for some advice, good people. I have built a website in RW using @habitualshaker 's excellent Source framework. I run a community market as the coordinator and we are also taking on a new software application to manage our stall holders. One of its features is an xml feed of stall holder data from a url. I want to be able to surface this feed (it has tags for shows stall holder image, blurb and stall number) on a web page to show punters who is coming this month. Now I don’t know much about this subject but I understand I need an xslt stylesheet - and I need some kind of php or javascript code to process the records from the feed and then transform that via the stylesheet into html capable of being rendered on the browser. My xml comes from https://sitetrak.com.au/edit/mirboo_north_market_mirboo%20north%20market_site_holders.xml but I have no idea how this all hangs together. I am sure it is much more than using a Source Coder stack and lumping it all into that. I went so far as to use ChatGPT to write me the style sheet and the javascript and then apportioned that into the HTML code sidebars on RW but i am not having much luck getting any output. No doubt most of you are shaking your heads… But any advice welcome.

Maybe @joeworkman’s Feeds Stack can help ?

1 Like

Not 100% sure if Feeds has an option for XML but if it does then it would 100% be the stack to use. You don’t then need to worry about all the styling / html etc. You would just set up a template (e.g. a grid item) using your Source stacks as normal and Feeds would generate a new item for each item in the feed.

There is a Feeds RSS stack (that uses xml) but think it is probably set up for specifically for rss. @joeworkman should be able to advise.

I have a demo Source file that showcases using Feeds in Source.

Thanks @habitualshaker and @Jannis - I checked the link out and indeed it appears to be just about perfect for my needs - the demo file on Source shows exactly a page layout I would be aiming for. I think my url for the xml feed will not validate as an RSS/Atom feed so it may fail - dunno but the w3c validator did not pass it… - @joeworkman does my use case pass the commercial interest test? :)

Feeds can read in JSON formatted data. Maybe one could utlize some online XML-to-JSON converters to obtain a JSON format of your data.

(Just a thought, but i have no idea, whether and how it could work)

Edit: Just googling for XML-to-JSON conversion in PHP or Javascript brings up lots of hits …

Feeds does not have a direct XML parser. XML has sort of lost the format wars, JSON is a much better way to transmit data. As @GKs suggested, there could be a way to use an automation tool like Zapier or ActivePieces to automate this XML into a JSON feed.

1 Like