No question that data should ideally be stored in a database - that's what it's for. I was referring to situations where you need to store data in a text file for whatever reason, maybe to pass it to an external app, submit in a http post, or to send as an email attachment, etc.
I would also agree that it's tricky (not to mention inefficient) to manipulate an XML file, even with the help of the CFMX XML functions, and I would avoid trying to update an XML file once it's created. Where XML is extremely useful and flexible is as a medium of data interchange between systems, where one application creates it, and another application consumes it. So application A creates the XML file from its database, then passes it to application B which pulls out the data to update its database. I share your concern that often XML is used for the wrong purpose. Regards: Ayudh +--------------------------------------------------------------+ | Put money in your bank while you're on the road. | | Secure credit card payment by SMS messaging. | | VeriPay mPOS from Xilo Online: http://www.xilo.com/mpos | +--------------------------------------------------------------+ ----- Original Message ----- From: "spike" <[EMAIL PROTECTED]> To: "CFAussie Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 10:43 Subject: [cfaussie] OT: Handling XML in CFMX was Re: Anyone got any ideas on a list > I would have to respectfully disagree with part of what you're saying here. > > Storing data as XML in a text file can get pretty nasty when you later > want to manipulate it from CFMX. > > Let's say you have the following: > > <company> > <employee> > <firstname></firstname> > <lastname></lastname> > </employee> > <employee> > <firstname></firstname> > <lastname></lastname> > </employee> > </company> > > Now, I store this in an XML file and at some later stage I want to add a > new employee. > > The code required to do this is ugly at best, and that's for a simple > XML document. When you have a document that goes down to 5 or 6 levels, > and you want to add a new node somewhere deep down in the structure can > be plain nasty. > > In short, there can definitely be times where you'll regret it over > using a database, > > Spike > > Ayudh Nagara wrote: > > >Whenever you need to store data records in a plain text file, it's a job for > >XML. It's not that hard to get into and once you've set it up, you'll never > >regret the flexibility it offers. If you're only using the data within CF, > >maybe use WDDX which provides some nice shortcuts. > > > >Regards: Ayudh > > > >+--------------------------------------------------------------+ > >| Put money in your bank while you're on the road. | > >| Secure credit card payment by SMS messaging. | > >| VeriPay mPOS from Xilo Online: http://www.xilo.com/mpos | > >+--------------------------------------------------------------+ > >----- Original Message ----- > >From: "Gareth" <[EMAIL PROTECTED]> > >Newsgroups: cfaussie > >To: "CFAussie Mailing List" <[EMAIL PROTECTED]> > >Sent: Wednesday, June 18, 2003 08:57 > >Subject: [cfaussie] Re: Anyone got any ideas on a list > > > > > > > > > >>Anyone know how I might use a text file in a way that I may use two values > >>per record. I know how to make a list from a text file but that only > >> > >> > >carries > > > > > >>one value per record. I want to be able to have two or even three values > >> > >> > >per > > > > > >>record. > >> > >>Cheers > >> > >>Gareth > >> > >> > >> > >>--- > >>You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > >>To unsubscribe send a blank email to > >> > >> > >[EMAIL PROTECTED] > > > > > >>MX Downunder AsiaPac DevCon - http://mxdu.com/ > >> > >> > > > > > >--- > >You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > >To unsubscribe send a blank email to [EMAIL PROTECTED] > > > >MX Downunder AsiaPac DevCon - http://mxdu.com/ > > > > > > > > > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
