Articles / XML and PHP

XML and PHP

"XML and PHP" is designed to teach you just one thing: How to use PHP to create XML-based applications. Unlike some of the heavier books out there, it does not attempt to cover every single PHP function; rather, it zooms in on the XML API built into PHP and illustrates, with some well-thought-out examples, how they can be applied to different situations.

The book is divided into nine chapters, each one covering a different piece of the XML/PHP pie. The chapters are arranged in order of complexity, which makes it possible to read the book sequentially or to use it as a reference, jumping straight to the chapter dealing with the topic you're interested in. I found this to be a very sensible approach, though if you are new to the topic, I would still recommend reading it sequentially.

The chapters cover most of the common XML technologies in use today: the Simple API for XML (SAX), the Document Object Model (DOM), the Extensible Stylesheet Language (XSLT), Web Distributed Data Exchange (WDDX), XML Remote Procedure Calls (XML-RPC), XML2SQL (XML to SQL conversion), and SOAP (Simple Object Access Protocol). The book also includes two very unique chapters, one explaining how you can use off-the-shelf, free PHP widgets to build XML/PHP applications, and one containing detailed case studies of real-life XML/PHP applications (complete with code snippets and line-by-line explanations).

The chapters contain both theory and code, together with practical examples that you can try out on your own computer. The code examples are well-commented, and are fairly easy to follow, though if you can't follow them, each comes with a couple of paragraphs explaining the knotty details. The language used in the book is simple and easy to follow, and the author has made a conscious effort to break up the dry technical material with humor and interesting asides. The overall production quality of the book is excellent, with clear, easy-to-read type, high-quality paper stock, and a strong spine.

The book comes with a companion Web site (no CD, though) which you need to access at http://www.xmlphp.com/ in order to download the code samples used in the book. The site provides links to the software applications profiled in the case studies and to other Web tutorials on XML and PHP. (These links are a little sketchy at the moment, and are primarily pointed to the author's other articles on the topic; hopefully, more diverse links will be added soon.) It also includes a number of discussion boards which are monitored by the author and which readers can use to post questions or comments on the chapter topics (quite a novel idea, and, hopefully, the feedback provided will be used to improve the next revision of the book).

There is scope for improvement in some areas. While the book is certainly a good reference guide for programmers just starting to use XML and PHP, it may be too simplistic for developers who already have experience with the two languages; some more advanced examples would have added more value for such readers. Additionally, the appendix covering the process of recompiling PHP with XML support could be expanded to include better coverage for using an Apache DSO module, and to include more detailed installation instructions for Windows users. Finally, a more detailed link directory on the Web site would be extremely useful to readers interested in learning more about the topic.

However, these are minor gripes about what is a fairly readable and interesting book, and one which most XML/PHP programmers are sure to appreciate. If you're a PHP developer looking to build new skills, you should definitely add XML and PHP to your shopping list.

Recent comments

20 Sep 2004 04:39 Avatar mdnava

The XML Bible
Also for those non-programmers I've seen around The XML Bible, which seem to focus in a page creator point of view rather than a programmer.

25 Jun 2004 13:46 Avatar AndrewCates

really useful review
This review has been around for a while with no comments but this review is really useful and we should have more of them like this Bozmo (http://catesfamily.org.uk/)

Screenshot

Project Spotlight

Kigo Video Converter Ultimate for Mac

A tool for converting and editing videos.

Screenshot

Project Spotlight

Kid3

An efficient tagger for MP3, Ogg/Vorbis, and FLAC files.