Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

xml benefits

9:44 am on Jul 25, 2005 (gmt 0)

New User

10+ Year Member

joined:July 19, 2005
votes: 0

Hi I have a page containing xml data that is generated in a php page through mysql database. I have then performed an xsl transformation using an xsl stylesheet and a php script to print html.

what i want to know is, is there any benefit of spitting xml out then transforming it in this way as opposed to generating a styled php page straight away (cutting out the xml step) from the data in mysql database?

thanks in advance


5:15 pm on July 31, 2005 (gmt 0)

New User

10+ Year Member

joined:July 31, 2005
votes: 0

I use a similar technique. C# connecting to SQL server creates XML, which is then transformed through XSL. The site structure and content is defined within the database.

All the database form submission stuff is handled through XML creating updategrams fired straight into sql server - this is a definite benefit for me. It's very rare that i need to play around with creating db insert/update scripts.

The main benefit of this approach for me is that if i want to create a new site - i copy the database, XSL, c# and all i need to do to restyle is to change the base xsl stylesheets. i can knock out a full cms integrated site and just change the xsl to restyle as the new client desires. Saves me lots of time, hence more money :-)

Not looked into trying this approach with MySql yet, its gotta be worth it - SQL Server is too expensive to run

5:40 am on Aug 2, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2005
votes: 0

The only benefit I can currenly see is if you want others to be able to easily extract data from your page.

They could have an automated process parsing the XML themselves and extract the data they wanted without worying about any layout changes you made breaking their extract process.

I can forsee search engines eventually parsing XML data as well and being able to give better targeted results.

9:50 am on Aug 5, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:July 18, 2005
votes: 0

Another benefit that has not been mentioned is the multiusage potential. When all your data is XML first, you could easily transform the output to html for browsers, wml for wap.yourdomain.com and some pages could be directly transformed rss. And the list goes on.