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

From: Date: Wed, 22 Nov 2000 10:53:06 +0000
Subject: AW: AW: [PHP] What's your call on XML?
Groups: php.general 
Request: Send a blank email to php-general+get-26610@lists.php.net to get a copy of this message
> be working with. I will give you two examples of things that > will be much > easier with XML. to the first example : you used XML for you project because the newsprovider published them in XML. he could have given you the data in any format. i had to create an XML-Based Infomation System for students. it WAS very easy easy to create. it was fast untill it had to deal with real data(=all the courses in that university) the data file was only 160k big but parsing it took ages. i thought maybe i'm stupid and/or the php-parser for XML sucked and parsed the same file with a java-xml programm. Same here : very slow and ate up a lot of memory. second example : i don't know how the manual on php net is done, but by it's speed i doubt that it is served directly from the XML-Files. i THINK that it uses the XML to feed some sort of Database and/or writes the output once and serves cached files. which brings me to the following conclusion : you have to know XML to get you data into MySql,Oracle or whatever and then use this to serve the content. NEVER USE XML TO STORE THE DATA FOR YOUR SITES. it simply can't be done if the data grows to the size of the php-manual. that's just my opinion and everybody should feel free to prove me wrong by pointing me to a big site that uses XML for live content....... sebastian > 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 (#26610) next »