Ultimately it's about flexibility and seperating content from 
presentation.Even if you don't have sites that need to be output into 
multiple formats you will almost cetainly need to redesign some or all 
of the presentation at some point even if it is only in html.  Have you 
ever had your boss/client say "I want to give the Website a new look". 
 If you have content mixed in with presentation you will need to do a 
lot of work to mix your content into a new presentation layer.

It's also about writing code that is easy to maintain. You can make  a 
class to convert db content to xml and another to convert xml to html 
via xslt. Your pages suddenly become very easy to write (an have fewer 
lines of code) , they only differ in the sql statment and the name of 
the xsl file.

I am going to do all my sites like this now. I'm tired of the old way. 
it's too much work.

Joshua Alexander wrote:

> I still wouldn't use XML for this. I mean, all the articles are in the 
> database, and I'm already using PHP to pull them out and format them 
> into html, right? I can just as easily use PHP to put them into all 
> those other formats.
>
> So again, why waste time with XML unless I need to feed these articles 
> to others, like in a newsfeed situation?
>
>> But if I were ever I would definitely invest the effort that is 
>> required,
>> but until then I will save myself from the extra work.
>
>
>> Let's imagine you create a website of an online magazine, this magazine
>> publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?
>>
>> I would use XML to write the articles and then stylesheets to 
>> transform the
>> articles to the formats I want. Write once, publish anywhare ;-)
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to