Introduction

I l @ ve RuBoard

"There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy."

”William Shakespeare, Hamlet

Unless you've been doing a Rip Van Winkle for the past few years , you've heard about PHP and XML.

Probably not in the same context, I'll grant you ”one is, after all, a programming language for the web, whereas the other is a standard toolkit for describing data. Individually, they're both long-time sweethearts of the notoriously fickle web community ”PHP for its rapid application development capabilities and XML for its capability to make data more useful by attaching descriptive tags to it.

Although there is no shortage of information on either of these two technologies individually, there are very few resources that explain how to use them in combination with each other. Which was exactly the problem I had about a year ago, when I decided to use XML as one of the components of a web-based project I was working on. PHP was my development language of choice. (I'd long since given up on Perl and JSP.) Although I knew very little about how PHP and XML could be integrated with each other, I blithely assumed that the web, with its gargantuan knowledge bases, would have more than enough information to help me complete the project.

Imagine my horror , then, when I was able to find only the sketchiest information on the topic, despite hours spent tapping different permutations of "php xml development" into Google's search box. With time running out, I decided to go to plan B: I printed a copy of the XML and XSL specs , stocked up on microwave dinners, and started experimenting with PHP's built-in XML functions.

I soon realized that combining PHP with XML wasn't hard at all ”in fact, it was pretty easy. Before long, I had worked out the basics of the SAX and DOM functions, installed my own copy of the XSLT extension, and figured out just what I needed to do to deliver the project on time. All it took was patience, a little research . . . and a lot of time.

In the highly competitive world of web development, in which contracts often turn on how quickly a project can be executed, time is a valuable commodity. Working with picky customers against aggressive deadlines is stressful enough for most developers; having to spend most of the day on research, rather than implementation, isn't likely to make their day any sunnier. And so, one of my most important reasons for writing this book was that it might serve as a starting point and reference for other developers looking to build XML- and PHP-enabled web applications.

This book is the book I wish I'd had a year ago. It includes detailed explanations of PHP's XML extensions, together with illustrations of using PHP to parse, validate, and transform XML markup. I've also discussed, among other things, how to traverse XML data trees, exchange data between web applications, overlay remote procedure calls over HTTP, and use free open-source tools to add new capabilities to your XML/PHP applications.You can read it all the way through, or use it in traditional cookbook style, flipping it open to the chapter that addresses your specific problem. Either way, I hope you find it useful, informative, and (dare I say it?) fun.

Over the past year, I've written a few articles on how XML and PHP can be used together, and I've even given a couple of presentations on the topic. From the feedback I've received, it seems that there are still many, many people ”developers, consultants , educators, webmasters, systems engineers , or just good ol' PHP enthusiasts ”who would love to know how XML and PHP can be combined together, but don't know where to start.

If you're one of those people, this book is for you.

I l @ ve RuBoard


XML and PHP
XML and PHP
ISBN: 0735712271
EAN: 2147483647
Year: 2002
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net