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 [email protected] To [email protected] 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 > [email protected] > > > To [email protected] > > 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 > [email protected] > > > > > To [email protected] > > 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: [email protected] > 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 http://www.fusionlink.com -------------------------------------------------------------
