Display Only Restaurant Name from XML Feed (ColdFusion)
Hi everyone,
I’m working on a small food-related project in ColdFusion where I need to pull menu data from an XML feed. The feed has both restaurant names and menu items mixed into one "keywords" field.
Here’s a simplified version of the XML:
<cfxml variable="menu">
<catalog>
<food id="cs101">
<author>Chicken</author>
<keywords>Chicken Salad Chick, Classic Carol, Lauryn’s Lemon Basil, Cranberry Kelli</keywords>
</food>
<food id="cs102">
<author>Deli</author>
<keywords>Subway, Italian BMT, Turkey Breast, Tuna, Veggie Delight</keywords>
</food>
</catalog>
</cfxml>
What I’d like to do is just display the restaurant name (always the first value in the keyword string) and ignore the rest.
Desired Output:
Chicken Salad Chick
Subway
For context, the real data comes from a food blog project I’m building: https://chickensaladchicksmenu.com
Any help or code snippet would be awesome 🙏
