Overall, pretty good as far as it goes. I'm glad it doesn't even attempt to include a Perl tutorial. The progression through the stages of XML processing is very good, building up from simple parsers through to SAX and on to DOM. There is lots of example code to explain things in practical terms. The book itself is just the right size (not too short, but not of epic [and unreadable-in-the-bath] proportions).
Unfortunately, I have a couple of gripes, too:
- The index doesn't appear to be complete. I immediately looked up XML::Twig in there when I got it and it was lacking. I'm now nervous about it missing other things.
- The coverage of SAX is very skewed towards the first edition of Perl SAX. Whilst I understand the need to cover this, XML::SAX is much more useful these days. I do realise that this is a moving target though. :-/
- On XML::SAX again, one of the most important features was entirely skipped, without even a mention: SAX Filters. This is the XML equivalent of Unix pipelines and makes XML enormously easy to use in a nice componentized fashion. A brief glimpse of XML::SAX::Machines would have been a very worthwhile inclusion.
- Unfortunately for a book on XML, many of the ampersands in program listings aren't correct. There are many examples like s/&/&/g (which should be s/&/&/g). Example 4-4 (sub handle_char_data) shows this. Example 3-1 is also particularly broken in its regexes.
Despite the above complaints, I still find this a good book for explaining to Perl programmers what XML is and how it should be used in Perl.
|