1 Reply Latest reply on Jul 17, 2007 1:58 PM by msturner1966

    Problem With XML Parsing

      I have a very simple xml document I want to read:
      <?xml version="1.0" encoding="iso-8859-1"?>
      <newsitem date="07/16/2007" category="practices">
      <title>Next Week's Practices</title>
      <details>We currrently have practices scheduled for next ...</details>
      <newsitem date="07/16/2007" category="practices">
      <title>Next Week's Practices Problem</title>
      <details>I was only able to move to an EARLIER practice for...</details>
      <newsitem date="07/17/2007" category="practices">
      <title>Next Week's Practices Amended</title>
      <details>Mrs. Johanning pointed out a schedule conflict ...</details>

      I use the technique right out of the CFM Reference Book:

      <cffile action="read" file="c:\websites\newsitems.xml" variable="xmldoc">
      <cfset mydoc = XmlParse(xmldoc)>
      <cfdump var="#mydoc#">

      I can dump the "xmldoc" variable so I know the file is being read. but when I dump the "mydoc" I get the following error:
      Error Diagnostic Information

      An error occurred while evaluating the expression:

      mydoc = XmlParse(xmldoc)

      Error near line 30, column 7.

      Error resolving parameter XMLPARSE

      ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

      You have misspelled the parameter name, or
      You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.

      Can anyone help me with this?