#native_company# #native_desc#
#native_cta#

Book Review: Pro PHP, XML and Web Services

By Adam Delves
on July 31, 2006

Pro PHP XML and Web Services

Since its release in 2004, PHP 5 has evolved to become
stable enough for serious consideration in use in a
production environment. Along the way, PHP 5 has seen
more than a handful of tweaks and changes, especially in
its overhauled support for XML and XML web services. Now
that it is a stable, it is fitting that there be a
reference on all things PHP and XML.

Enter Pro PHP XML and Web Services, which aims to be
“your single source of reference when using XML in
PHP”. Alas, the first thing that struck me about
this book when it arrived on my door step was its Bible
like size.

The author, Robert Richards, was one of the developers of
PHP 4’s DOM XML extension and a contributor in PHP
5’s new DOM extension. From the outset, he makes it
clear that he will leave no stone unturned and explain
XML, its technologies and implementation in PHP in
detail.

If you have never heard of XML before, the first four
chapters tell you all you need to know and more. A real
treat is the chapter on xPath, xPointer and xInclude, a
subject which many authors tend to brush over due to its
complexity. In this book, Robert Richards explains it like a
walk in the park.

He then goes on to showcase the XML parsers in PHP 5,
both the native ones and the PEAR XML parser. He devotes
an entire chapter to each; explaining fully their use and
features (or lack thereof) with examples in PHP. He also
demonstrates how to parse more complex documents that
include namespaces and how to extract the data you need
through xPath. He does not stop there, however, as he goes
on to explain the pros and cons of each parser and their
corresponding memory footprints and shows how to
effectively parse and process XML documents by combining
the technologies at your disposal.

The main focus of the book is XML web services which
Robert then goes on to explore. Again, devoting a chapter
to each, he starts with one of the most widely used
XML web services, RSS and Atom, and then feeds into
REST, WDDX, XML-RPC, SOAP and UDDI. The detailed
explanations of the appropriate specifications are second
to none. For each technology, he demonstrates through code
examples how to create and consume web services.

There is one more little treat that this book has to offer
however–the chapter on XML Security. It is rare to
encounter these two words in close proximity, but here
again we see an entire chapter devoted to the subject,
demonstrating the use of PHP’s native tools to
encrypt data within XML documents and the use of
application independent XML signatures to encrypt and
decrypt data inside documents.

Its hard to find fault in this book, but my only reservations concern the
chapters on XML Security and XSLT, which seem a little out on
the limb. Robert Richards has pulled out all the stops to
create an intuitive and detailed reference, a book which
could easily take the place on your bookshelf as the
single point of reference for PHP and XML.