Thanks for this, I'll spend some time reading..
<http://www.cooperebusiness.com/> ------------------------------------- Chris C. Cooper Cooper e.Business Solutions Atlanta, Georgia 404.691.4816 Cooper e.business Solutions - http://www.cooperebusiness.com <http://www.cooperebusiness.com/> _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charlie Arehart Sent: Tuesday, January 02, 2007 10:37 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] XML & CF MCG, your initial explorations with XML and CF are not unusual. You've gotten some good tips here so far. I'd like to offer a couple more--and not just for Mary-Catherine but for anyone learning to deal with XML in CF. It's one of those topics where--especially if you're new to XML in general--I'd argue one would NOT be well-served by just looking at/copying code snippets. You really need to "get it" first or you'll end up chasing your tail. Further, there are often many ways to do something (even more than what' s been proposed here). The best resource I ever found, and which really sparked an Aha! moment for me when I first read it a few years ago, is Nate Weiss's 30-page article: http://www.adobe.com/devnet/coldfusion/articles/xmlxslt.pdf It's a real page-turner. Seriously. :-) Don't let the 30 pages scare you off. You'll come out of it after an hour or so with tremendous appreciation for what XML processing in CFML is about, including tips and techniques that you might have struggled with to learn on your own. It was actually a chapter in the original CFMX version of the WACK book which he was permitted to release online. A wonderful resource, and as timely now as when it was first released. To address the "why would I want to bother" that Chris raised, in addition to Teddy's point about Flex, another is that Spry and indeed many Ajax solutions also leverage XML. Also, often one is given a file to read, whether for data interchange as Andy indicated or for reading a file already on your computer, since so many tools (including CF) now use XML files for configuration. /Charlie http://www.carehart.org/blog/ _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 10:04 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] XML & CF I will be using CF to get things in and out, just not sure of the best logic. I'm been looking at the docs plus some other sites out there and copying code snippets. Hoping it will set up some of the page flow for later on. Come on, trying to learn stuff here. :) mcg Steven Ross <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/02/2007 09:23 AM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject Re: [ACFUG Discuss] XML & CF If you are faking something for demo data use WDDX, it will be a whole lot easier to use in CF. On 1/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Like I said, for faking things for demo purposes (figured it would be quick > and dirty) and mom's little website (not much data). :) > > mcg > > > > > > > Teddy Payne <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > > 01/02/2007 09:02 AM > > Please respond to > discussion@acfug.org > > > To discussion@acfug.org > > cc > > Subject > Re: [ACFUG Discuss] XML & CF > > > > > > XML is typicaly there for storage of information in a homogenous way. > John's suggestion of WDDX makes short hand of CFML constructs and is > adaptable to JS and XML format. > > XML is used for configuration files, datasources and webservices just as a > couple of examples. > > A lot of Flex examples use XML as a way to have a datasource for demo code > without needing a remote call. > > If the test is for demo only, XML datasources work nicely. > > Teddy > > > On 1/2/07, [EMAIL PROTECTED] < > [EMAIL PROTECTED]> wrote: > > For this project, a) I'm learning it, b) figured it would be easier to deal > with than creating a database and dealing with the ISP. But for another > project, I'm looking at using it for faking that a prototype is working for > demo purposes - namely because the database is REALLY complex. > > mcg > > > > > > > > > "Chris C. Cooper" <[EMAIL PROTECTED] > > Sent by: [EMAIL PROTECTED] > > 01/02/2007 08:40 AM > > > Please respond to > discussion@acfug.org > > > > > To discussion@acfug.org > > cc > > Subject RE: [ACFUG Discuss] XML & CF > > > > > > > > > What is a practical use for XML? What kind of situation would call for > using it? > > > > ________________________________ > > > From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Andrew Powell > Sent: Monday, January 01, 2007 8:54 PM > To: discussion@acfug.org > Subject: Re: [ACFUG Discuss] XML & CF > > Also, I would suggest Jeff Peters' book on the CF XML Object: > > http://www.cafepress.com/protonarts.50984013 > > ap > > > On Jan 1, 2007, at 8:31 PM, Andrew Powell wrote: > > > 1. Read the XML file with CFFILE > 2. Parse the xml string with xmlParse() > --optional, but recommended-- narrow your XML document down to an array of > of your data elements using xmlSearch() and the xPath to your data > 3. loop over data and do what you will with it (conditionals to check, > etc.) > 4. write it back to the server or whatever storage space you are using > (database, etc.) > > As far as writing back the whole XML doc, that may be a matter of not using > xmlSearch() and working with the whole document instead. I'm not sure if > xmlSearch() returns its array by reference or by value. Someone else may be > able to clear this up. In the livedocs someone says that searches on the > same XML doc are NOT thread-safe within a shared scope. This leads me to > think that the array returned by xmlSearch() is returned is a reference to > the original xml doc. If that is the case, then you can just manipulate that > data in the array that xmlsearch() returns and then write the original xml > back to a string with changes intact. I would not write it to an array of > structs or a query if you're going to write back as XML to the server or > database. Just manipulate the original XML doc and save the processing of > conversion. > > To write it back to the server, you just toString(myXMLObj) within your > CFFILE action="write" tag. > > > > > On Jan 1, 2007, at 8:12 PM, > [EMAIL PROTECTED] wrote: > > > I've not really worked with XML and CF. I've gotten some basics down, and > have looked, but am iffy on my logic. > -You read the XML file > -Read the length of the data from the XmlChildren array > -Loop over the parsed XML to put things into a query > -Output data or whatever > -Now to get a specific 'record', you do the same above, except putting an > if statement in your loop to add things your query (or select the specific > item in the query) > -To add/ modify/ delete things, you do whatever to the query, convert it to > XML (or modify the XML object itself) and then rewrite the XML file > This sounds cludgy to me, I've got to be missing something. What if you > have a large dataset (which I won't in this case)? > Thanks, > mcg > (Yes it's New Year's Day, but working on mom's website, and the USC - MICH > game isn't terribly interesting) > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ > http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ > http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink > ------------------------------------------------------------- > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ > http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink > ------------------------------------------------------------- > > > > > -- > <cf_payne /> > Adobe Certified ColdFusion MX 7 Developer > Atlanta CFUG (ACFUG): http://www.acfug.org > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ > http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink > ------------------------------------------------------------- > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ > http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink > ------------------------------------------------------------- > > > > > > > > -- Steven Ross web application & interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
<<attachment: image002.jpg>>
<<attachment: image001.jpg>>