You may want to check out the CFMX livedocs for an explanation of the
XML features in CF at
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/xml2.htm. You
may also want to pick up the most recent copy of Ben's book - MX is
almost a completely different product from 4.0.
Your code is pretty much on target for what you want to do. Here's a
quick example of some xml reading:
<cfset xmlString="<books><book isbn=""123-123-123""><title>How to Use
XML</title><author>John Doe</author></book></books>">
<cfset xBooks = xmlParse(xmlString) />
<cfdump var="#xBooks#">
<!--- xmlChildren is an array --->
<cfoutput>#xBooks.xmlRoot.xmlChildren[1].title.xmlText#</cfoutput>
<!--- xmlAttributes is a structure --->
<cfoutput>#xBooks.xmlRoot.xmlChildren[1].xmlAttributes.isbn#</cfoutput>
On Thu, 07 Oct 2004 12:18:59 -0400, Britta Bennett
<[EMAIL PROTECTED]> wrote:
> Hi Craig,
>
> Thanks for your reply. I think the problem I'm having is not with the
> parsing aspect of it, but the loop that goes through the data for each
> listing, converting the xml to cfvariables, being too slow.
>
> Does the XMLParse run as fast as the CFX_XMLParser?
> My server's running MX, but I had never heard of it till now as the manual
> sitting on my desk is Ben's good old CF 4.0..
>
> Would you be as good as to tell me how to parse the following string:
>
>
> http://mlsr.realtylink.org/mlsr_xml/res_sale_result.cfm?agentid=4001&mxrw=50
>
>
> Would this work?
> <cffile action=""> > file="http://mlsr.realtylink.org/mlsr_xml/res_sale_result.cfm?agentid=4001&mxrw=50"
> variable="XMLFileText">
> <cfset myXMLDocument=XmlParse(XMLFileText)>
>
> Then once I've done that, how to I refer to the content?
> For instance,
> <cfoutput>#Listing.ListingDetails.HomeAddress#</cfoutput>??________________________________
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

