Professional PHP4 XML
ISBN 1-861007-21-3 Price £36.99 UK
Luis Argerich, Ken Egervari, Matt Anton, Chris Lea,
Charlie Killian, Chris Hubbard, James Fuller
16 Chapters, 7 Appendices and Index in 945 pages
Chapter List
1
Introduction
2 PHP
Fundamentals
3
XML Fundamentals
4
XML Derivatives
5
SAX
6
DOM
7
XPath
8
XSL
9
XML Classes
10 Putting it
Together
11 Syndicated
Content
12 XML to DB,
DB to XML
13 XML Storage
14 PHP as a Client
15 SVG
16 XML-RPC
17 Case Study: A calendar Server
Using XML-RPC
PHP4 XML Language
Reference
Installing PHP4 and Apache
- Appendix C
SAX 2.0: The Simple API for XML
- Appendix D
Xpath
Reference
Object-Oriented Programming
Synopsis
An impressive list of well healed and very experienced
developers set out to write and publish a weighty and well thought out book
about the subject of finding a way to use PHP and XML to process data quickly
and effectively without any problems. There are some excellent examples
of how to do something with these programming languages. There are other
Wrox books which you can read at the same time as this one which provide
an interactive back drop for someone who wishes to learn more about Open
Source or Free Software. All Wrox publications have some good examples
of code and they explain how to add to some basic ideas. The code is
laid out in grayed out boxes similar to the one that you can see below..
class FilterBuildBooks extends AbstractFilter
{
var $oneBook = 0;
var $book;
var $property = 0;
var $books = Array();
function GetBooks()
{
return $this->books;
}
function StartElementHandler ($name,
$attribs)
{
if ($name == "book") {
$this->books[ ] = new Book ();
$this->oneBook = 1;
} else {
if ($this->oneBook)
{
$this->property
= $name;
}
}
$this->listener->StartElementHandler ($name, $attribs);
}
function EndElementHandler ($name)
{
$this->property = 0;
if ($name == "book") {
$this->oneBook = 0;
}
$this->listener->EndElementHandler ($name);
|
Use of SAX to create PHP objects from XML
|
Review
As the introduction so carefully points out PHP
is a good programming language and XML is a good way of interacting with
data. The support within PHP for XML while still young is sufficiently
mature that the combination of the two is now viable. This means
that someone has to publish some documentation about it in order to open
up a discussion about what it is that may or may not be possible.
Professional PHP4 XML is that documentation and it is a welcome addition
to all of the other documentation which is available through the internet.
This book covers the PHP language and is up to date with the latest
4.2 release. It also covers the XML standard and the interaction between
these widely used technologies. You will learn the "core" standards for XML
processing such as Xpath, Document Object Model, SAX and XSLT and how to
use them from PHP. Satellite standards, vocabularies and other technical
topics related to XML processing are also covered with examples tips and
suggestions from an experienced group of PHP programmers and XML experts.
Who is this book for ? It is aimed at PHP programmers
who need to process XML data or interface different systems using XML.
It serves as a reference and possible source of inspiration. Non PHP
programmers who need to construct a web based frontend for an application
using XML can learn how to do it using PHP because the book also covers the
basic foundations of PHP programming.
Some of the well known elements of web programming
are discussed in the earlier part of the book. Basic structures are
followed on by some XML structures and functions etc. After this SAX
and DOM are shown and what can be done with those. The potential lack
of harmony or problem with a discontinuous argument of some sort is taken
care of at page 391 where the tenth chapter entitled "Putting it Together"
shows us what kind of things can be done with this technology if you use your
head a bit. The other remaining seven chapters go into some complex
explanation to this end.
If you haven't been exposed to these programming methods before you
might do well to get hold of this publication and read it from cover to cover.
You will find out why people are walking away from other programming
methods.
Review by Richard
Ibbotson.