3 Replies Latest reply on Apr 12, 2007 10:05 AM by Anthony Spears

    Looping through xml

    Anthony Spears Level 1
      This is the situation. I am parsing xml and putting it into a cfquery.

      This is the basic structure of the xml

      <year count=1 value=90>

      <year value=91>

      <year value=92>

      Tag1 will always exist and Tag2 only sometimes

      I am looping through the xml and putting it into a query which looks pretty much like this.

      Year Tag1 Tag2

      How do I detect to see if tag2 exists under each year tag and then insert the value into the query or put zero into the query when it doesn't exist?

      Thanks in advance.