Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP or XML 1

Status
Not open for further replies.

stefanieb

Programmer
Nov 27, 2002
3
NL
Why should I learn XML if i can do it in PHP.

I'm making a CRM module, all the functions i can think of i can make in PHP.

So can someone tell why i have to use XML
 
I wanted to know the pro and against of XML vs PHP?

How it is going now I'm going to use PHP.

 
I think you are misunderstanding XML. You can use XML in PHP both as a datasource and as a datacess and display tool. PHP has XML and XSLT support built into it. I say use PHP or both. You need to look at what you are doing and understand what you can do with XML and XSLT to make your life easier.

I use ASP and XML at the moment. I get XML based data from a SQL Server 2000 database via ASP and then I either walk it using ASP to render what I want or perfom certain operations or I apply an XSLT to render the correct HTML. It all depends on what I want to do with the XML data that I either pull from the database or load from a local XML file.

You could use PHP to validate input or do some logic to determine what data to get and then use the XML and XSLT functionality within PHP to work with the XML data. If you want to apply XSLT transformations on XML data then its better done on the server as you don't know what XSLT parser (if any!) the client browser has access to).

I hope this helps a bit in making it a bit clearer that its not a case of one or the other.

James :) James Culshaw
jculshaw@miniaturereview.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top