Re: PHP and XML?

From: Date: Wed, 30 Aug 2000 23:26:51 +0000
Subject: Re: PHP and XML?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14481@lists.php.net to get a copy of this message
James Moore wrote: > > Whats the big flipping deal about XML then? > [snip! some very good points] > If I was to write an application that deals with simple > purchases then maybe a csv file would be used (Well hopefully I would use a > RDBMS) but a csv file might be more suited.. Actually, a purchase order is a good example of where XML is much better than a CSV or flat file. How do you show the information about a customer and then 'n' number of products that they want to purchase? In XML you just have a some tags holding the customer info and another group of tags that can be repeated to represent products being ordered. Is there are simple way of doing the same with CSV? not really. XML is suited to representing info that can be placed in a tree, with CSV is only really useful for table based data. (i.e. data that can be placed in a table.) Then you've also got the problems with CSV like how do you represent different character sets, how do you represent a comma value in CSV. XML provides uniform solutions to these problems. As for complexity, XML parsers shield application programmers from having to directly deal with the XML syntax. I strongly recommend buying a good book on XML and reading it from start to finish. I can recommend "XML by Example" from QUE. There is a lot to XML and most of it is not obvious if you just give it a quick glance. I was surprised. -- Simon Edwards Animated Design, Melbourne http://www.animated.net.au/ Ph: (03) 98850990

« previous php.general (#14481) next »