Re: AW: [PHP] What's your call on XML?

From: Date: Wed, 22 Nov 2000 11:36:08 +0000
Subject: Re: AW: [PHP] What's your call on XML?
Groups: php.general 
Request: Send a blank email to php-general+get-26620@lists.php.net to get a copy of this message
Addressed to: Sebastian Stadtlich <Stadtlich@mediaworx.com> php-general@lists.php.net ** Reply to note from Sebastian Stadtlich <Stadtlich@mediaworx.com> Wed, 22 Nov 2000 10:50:50 +0100 > Forget about XML... it sucks... right now i can't imagine one Projekt on > this earth that would need = XML. don't ever think about replacing your > database with XML-Files. one thing that XML clains to be perfect in is in > exchanging data = files... what's wrong with a SQL-Dump or a textfile > which structure you know? ( basically that is what XML is all about).. > Sebastian p.s: if i'm wrong please someone point me to a projekt that was > done in = XML and could not be done significantly faster with a > Database...... Crescent Wrenches aren't the best hammers either, but that does not diminish thier value when you don't know what size bolts you are going to be working with. I will give you two examples of things that will be much easier with XML. 1. Displaying headlines from isyndicate.com, and many other news providers. You can chose between HTML or XML format for the data you receive. You are very limited in what you can do with the HTML format, unless you want to try to write a custom parser to read it and reformat it. The other choice is to accept the XML formatted headlines, in one of two possible formats. It turns out that was my first (and only) XML project. I was quite amazed, ot only took about four hours to code it and get it working using the XML parser included with PHP. It is also a good example of when to use XML. They send the name of the news supplier, a heading, a blurb and a URL, for a number of news stories, nicely packed in an XML document. Just a few lines of PHP code will put the data in variables, ready to be displayed, any way you want. Any other language with XML support will be able to parse the data they send just as easily. You don't have to roll your own parser for each and every file format. I agree, if you have control of both production and use of your data files, custom formats _may_ have advantages, but if you are planning on serving data to the 'net for all to use, or capturing it from someone else, XML has an advantage. 2. Creation of documentation, like the PHP manual. The manual is stored in CVS using XML format. A program can read the XML source files and create final documentation in quite a number of different formats, like Postscript, PDF and HTML. Rick Widmer Internet Marketing Specialists www.developersdesk.com

« previous php.general (#26620) next »