p. DevZone regulars (you know who you are) will recognize the title of this book from our earlier coverage. My buddies over at “apress”:http://www.apress.com/ sent me a sample chapter to share with you. If you missed it, “click here”:http://devzone.zend.com/article/865 to go review it.
p. As with any book of this size, Rob started things off with the obligatory history of of the topic, in this case, XML. Sometimes these “look back” chapters are interesting but come on, this is XML. Luckily, the history part of the book is very small (2 pages?) and then mercifully moves on. The rest of the first chapter contains all the topics you would expect to find in an “Introduction to XML” chapter. It’s well thought out, well written and I’m sure will be read by those seeking a cure for insomnia. The good stuff comes later on.
p. I’m not going to try and give a detailed description of each chapter. If I did, the review would be half as long as the book. What I want to do is point out a few of the highlights in the book that you will find informative. Hopefully I will give you enough information to make a decision on whether it is worth the $49.95 price tag.
p. If you are new to XML or just curious about the details, the first four chapters are going to be a goldmine for you. Rob does a great job of covering what I consider to be some very dry ground. (Let’s face it, on the surface, XML just isn’t that sexy) Rob gives a good primer on XML structure, he explain validation, and goes in-depth on XPath. All of these topics are important and at one point or another you’ll want to know about them. It’s nice to know that someone has already done the research for us and all we have to do is wade through 20-30 pages per chapter to get what we need to know.
p. If you are an XML-Xpert or just too hyper to make it through Rob laying the groundwork then skip ahead to Chapter 5. This is where things get interesting. It’s in Chapter 5 that our favorite TLA (PHP) makes it’s first appearance in the book. It is in Chapter 5 that Rob introduces the libxml2 extension in PHP 5. [Side Note: This is as goo a place as any to stop and say this. If you are programming in PHP 4 and have no intention of moving to PHP in your lifetime, don’t buy this book. It will just make you long for all that you don’t have and make your remaining years on earth miserable.] Since the XML extension uses streams for I/O, Rob gives a quickie overview of PHP Streams now available in PHP 5.
p. From there on out the book is sprinkled with PHP source code. Rob gives clear background information on the topics he covers as well as code snippets to illustrate his point. Chapter 7 has to be my personal favorite since Rob covers SimpleXML. While SimpleXML, as it’s name implies, is simple to get started with, it’s still a powerful tool. Rob spends 40 or so pages showing it’s ins and outs. Along the way he shows how with a few lines of code you can create or consume XML with SimpleXML.
p. SimpleXML isn’t the only XML extension Rob covers in depth, it’s just only one I’m going to mention. Suffice to say that you can flip through the PHP manual, find any mention of XML and you’ll most likely find it explained in depth in this book. This includes one of my least favorite XML technologies (and honestly, that’s a long list) XSLT. Chapter 10 is dedicated to this useful but sometimes confusing technology. If, like me, you’ve struggled with implementing XSLT, this chapter may be worth the price of the book for you.
p. Starting somewhere in Chapter 14:Content Syndication: RSS and ATOM, we start transitioning into the Web Services part of the tour. Here we start talking all the XML knowledge Rob has been feeding us with a fire hose and start using it in a most Web 2.0 way. If you’ve ever wanted to know about the “innards” of an RSS feed you’ll love Chapter 14. Details, details, details just when you think there can’t be any more to know about RSS or ATOM, BAMM! he hits you with even more.
p. Seriously, my exposure to RSS and ATOM up to this point had been setting up an account on feedburner.com. Reading this chapter opened my eyes to the depth that these too structures have. The first 10-20 pages of the chapter are strictly dedicated to the elements of these feeds in their various versions. Near the end of the chapter though Rob throws us some code to play with and try to use our newfound knowledge. He shows the basics of both serving and consuming these feeds.
p. The next few chapters cover Web APIs in detail. XML-RPC, REST, WDDX and of course, SOAP. Rob gives you the basics of each along with concrete examples of how to use them.
p. !>http://static.flickr.com/109/286002791_cbf8391094_m.jpg! The book winds down form there. That’s not to say that the remaining chapters don’t contain useful information but after the mammoth SOAP chapter, everything else seems to just pale in comparison. So I’ll wind things up too.
p. Here’s my obligatory downside to this book. This book is almost too much. I hope Rob and those wacky press-jockeys over at “apress”:http://www.apress.com/ follow this book up with a series of smaller books breaking the topics into bite-sized chunks. As a tutorial book, it’s just too much. There is too much theory to make it a practical tutorial. However as a reference book it borders on too much as well. You have to wade through a lot of detail to get at that nugget of truth you are looking for; much like XML itself!
p. I’m sure there are programmers that can go their entire career without touching XML. However, if you are playing in the Web Services arena, it’s a fact of life. This book is a complete guide to that world. I’ll caution you though, take it in small doses, prolonged reading of this book has been known to cause “eureka” moments in even the most junior of programmers. Translated that means that if you have to work with XML, this is a great book to have handy. You may only reference it once every month or so but when it saves your bacon or makes you look like a hero to your boss, the $49.95 will have been money well spent.