3 Replies Latest reply: Apr 24, 2012 1:56 PM by mikesorako RSS

    Display Parts of XML Feed in ColdFusion


      I am working with ColdFusion/XML and would like to display restaurant names in my application. The problem is the restaurant names are part of the keywords field and are included with a list of foods the restaurant serves.


      <cfxml variable="eating">
      <food id="bk101">
      <keywords>Burger King, pie, hamburgers, fries, milkshakes</keywords>
      <food id="bk102">
      <keywords>Taco Bell, tacos, churros, burrito, gorditas</keywords>
      <food id="bk103">
      <keywords>Pizza Hut, pizza, cheese, garlic bread</keywords>
      <food id="bk104">
      <keywords>Chick-Fil-A, chicken, chicken wrap, sauce, Bananas Pudding Milkshake</keywords>


      I would like to pull the restaurant name from the feed and display it in a list format 

      • Burger King
      • Taco Bell
      • Pizza Hut
      • Chick-Fil-A

      The XML feed above is simplified, and I have a few hundred of that kind of data to display. Luckily the restaurant name is always listed first in the keyword field followed by the food. How can pull and display the restaurant names only from the XML feed above?