I l @ ve RuBoard |
Now that you've seen what PHP and XML are each about individually, you're probably wondering how the two of them fit together. The overall vision of XML and its ancillary technologies is very clear ”mark up data in XML, format it with XSL, link it together with XLink, and use it in a myriad of different ways. In reality, though, this overarching vision hits an obstacle at the first stage itself ”most browsers don't come with either an XML parser or an XSL processor. The latest versions of Internet Explorer and Netscape Communicator do support XML, but older versions don't. And this begs an obvious question: given that these browsers do not support XML (or support it in an incomplete manner), how do you, as a web developer, even begin to build the next generation of cutting-edge XML applications? Well, there's a simple solution: insert an intermediary layer between the client and the server to handle the processing of XML-encoded data. This intermediary layer can handle XML parsing, XSLT transformation, and other related tasks , serving as a translator between the server (which has XML data to transmit) and the client (which only understands a specific language like HTML or Wireless Markup Language (WML)). That's where PHP fits in. PHP serves as the meat in the sandwich, acting as the intermediary layer through which all XML processing is handled. Although PHP does not (yet) support the entire family of XML technologies, the latest version does include a very capable XML parser with both DOM and SAX extensions, and an XSL processor, through its Sablotron extension. PHP also supports Web Distributed Data Exchange (WDDX), a rapidly emerging XML-based standard for data transmission over the web and can be coaxed into working with XML-RPC and SOAP to issue XML-based procedure calls over the Internet. Finally, because PHP has support for a wide variety of databases, it's possible to use the language to build an XML document from a database or populate a database by parsing an XML document. Some of the applications that arise as a result of this combination are
|
I l @ ve RuBoard |