No Nonsense XML Web Development with PHP / Edition 1
  • Alternative view 1 of No Nonsense XML Web Development with PHP / Edition 1
  • Alternative view 2 of No Nonsense XML Web Development with PHP / Edition 1

No Nonsense XML Web Development with PHP / Edition 1

3.0 2
by Thomas Myer
     
 

View All Available Formats & Editions

ISBN-10: 097524020X

ISBN-13: 9780975240205

Pub. Date: 07/28/2005

Publisher: SitePoint Pty, Limited

A practical and concise book that teaches XML from the ground up. This tutorial style presents various XML methodologies and techniques in an easy to understand way, building a basis for further exploration.

XML is essentially an enabling technology, dry and boring on its own. As a result, most books on the market are dry, and academic in nature teaching theory

Overview

A practical and concise book that teaches XML from the ground up. This tutorial style presents various XML methodologies and techniques in an easy to understand way, building a basis for further exploration.

XML is essentially an enabling technology, dry and boring on its own. As a result, most books on the market are dry, and academic in nature teaching theory rather than practice. This book actually teaches practical, real-world applications of XML, using the very latest version of PHP (PHP 5) as the base language .

No Nonsense XML Web Development with PHP explains how XML can be put to use in real-world projects. The book also covers buzz topics such as RSS and Web Services.

From the Publisher

If ever there were a candidate for "Most Hyped Technology' it would be Extensible Markup Language (XML). 'No Nonsense XML Web Development With PHP' cuts through the hype and shows you how to get the most of this powerful, multifaceted technology.

No Nonsense XML Web Development With PHP dispenses with the theoretical possibilities of XML and presents real, practical uses of XML that you can apply to your existing Websites today. The book will teach you, step-by-step, exactly how to:

  • Create a full-blown Content Management System (CMS) based on XML.
  • Create a dynamic site map using XSLT.
  • Generate XML feeds (including RSS) for your Website.
  • Facilitate transfer of important information between disparate systems using XML-RPC
  • Use the Document Object Model (DOM) to manipulate documents.
  • Rapidly process XML using PHP 5.0's built-in SimpleXML functionality.
Unlike other dry, boring, theoretical writing on XML, this book doesn't cover the entire spectrum of XML technologies; it covers practical uses of XML that are useful to Web developers right now.

This book is designed to help you to get your feet (and perhaps your ankles, shins, and knees) wet with the topic of XML. You can instantly test out and apply the code examples provided in the book (and available for free download) to get a hands-on feel for the technology, and you'll gain the confidence to go out and build more.

The XML-powered content management system (CMS) that you'll build will be a complete, ready-to-use application. It draws on the author's experience of building XML-powered

Who Should Read This Book?

No-Nonsense XML Web Development With PHP is ideal for Web developers who want to discover what can be done using XML, whether they be experienced with PHP or relative newcomers. All that's needed to get started is a good understanding of HTML and some experience with PHP.

The book is written in the usual SitePoint style: it's clear and fun to read, with plenty of blocks of example code that you can apply immediately to your own Websites.

There's no need to re-type any of the code from the book. As always, all customers will receive instant download access to all the code and files used in the book so you can apply them immediately to your own projects.

What Slashdot.org Says...

"Kudos to the author for writing chapters on XML without sounding boring, redundant or too academic. I would highly recommend this book to anyone interested in developing PHP-driven Web sites that provide or consume Web services, work with XML data or generate XML for others to use."

Product Details

ISBN-13:
9780975240205
Publisher:
SitePoint Pty, Limited
Publication date:
07/28/2005
Series:
Build Your Own
Edition description:
REV
Pages:
354
Product dimensions:
7.04(w) x 8.96(h) x 0.84(d)

Table of Contents

Prefaceix
Who Should Read this Book?x
What's in this Book?x
The Book's Websitexii
The Code Archivexii
Updates and Errataxiii
The SitePoint Forumsxiii
The SitePoint Newslettersxiii
Your Feedbackxiii
Acknowledgementsxiv
1Introduction to XML1
An Introduction to XML1
What is XML?2
Why Do We Need XML?2
A Closer Look at the XML Example6
Formatting Issues12
Well-Formedness and Validity13
Getting Your Hands Dirty14
Viewing Raw XML in Internet Explorer15
Viewing Raw XML in Firefox20
Options for Using a Validating Parser20
What if I Can't Get a Validating Parser?23
Starting Our CMS Project23
So... What's a Content Management System?23
Requirements Gathering24
Defining your Content Types28
Gathering Requirements for Content Display31
Gathering Requirements for the Administrative Tool32
Summary32
2XML in Practice33
Meet the Family33
A Closer Look at XHTML35
A Minimalist XHTML Example38
XML Namespaces39
Declaring Namespaces39
Placing Namespace Declarations in your XML Documents40
Using Default Namespaces41
Using CSS to Display XML In a Browser42
Getting to Know XSLT44
Your First XSLT Exercise44
Transforming XML into HTML50
Using XSLT to Transform XML into other XML52
Our CMS Project56
News56
Summary58
3DTDs for Consistency59
Consistency in XML59
What's the Big Deal About Consistency?60
DTDs61
Getting Our Hands Dirty69
Our First Case: A Corporate Memo70
Second Case: Using an External DTD for Memos76
Our CMS Project77
Reworking the Way we Track Author Information77
Assign DTDs to our Project Documents?79
Summary80
4Displaying XML in a Browser81
A Word on XPath81
A Practical XSLT Application83
A First Attempt at Formatting84
Using XPath to Discern Element Context87
Matching Attribute Values with XPath88
Using value-of to Extract Information90
Our CMS Project92
Why Start with the Display Side?93
Creating a Common Include File93
Creating a Search Widget Include File94
Building the Homepage94
Creating an Inner Page102
Summary104
5XSLT in Detail107
XPath107
Programmatic Aspects of XSLT110
Sorting110
Counting116
Numbering117
Conditional Processing121
Looping Through XML Data125
Our CMS Project126
Finishing our Search Engine127
Creating an XSLT-Powered Site Map130
Summary136
6Manipulating XML with JavaScript/DHTML137
Why Use Client-Side Scripting?137
Working with the DOM138
Loading Documents into Memory138
Accessing Different parts of the Document140
XSLT Processing with JavaScript142
Making our Test Script Cross-Browser Compatible146
Creating Dynamic Navigation151
Our CMS Project157
Assigning Content to Categories158
Retrieving Content by Category158
Summary161
7Manipulating XML with PHP163
Using SAX164
Creating Handlers166
Creating the Parser and Processing the XML167
Using DOM169
Creating a DOM Parser169
Retrieving Elements170
Creating Nodes173
Printing XML from DOM174
Using SimpleXML174
Loading XML Documents175
The XML Element Hierarchy176
XML Attribute Values178
XPath Queries179
Using SimpleXML to Update XML179
Fixing SimpleXML Shortcomings with DOM180
When to Use the Different Methods181
Our CMS Project181
The Login Page182
The Admin Index Page186
Working with Articles187
Summary197
8RSS and RDF199
What are RSS and RDF?199
What's the Big Deal?200
What Kind of Information Should be Featured in an RSS Feed?200
Before We Get Started201
Creating Your First Basic RSS Feed202
Telling the World about your Feed204
Going Beyond the Basics206
RDF and RSS 1.0207
Adding Information with Dublin Core210
When to use RSS 1.0211
Parsing RSS Feeds212
Parsing our Feed with SimpleXML213
Our CMS Project215
Creating an RSS Feed215
Summary219
9XML and Web Services221
What is a Web Service?221
What's the Big Deal?222
What are Web Services Good At?223
XML-RPC224
The XML-RPC Data Model225
XML-RPC Requests228
XML-RPC Responses230
What do we Use to Process XML-RPC?231
SOAP231
What we Haven't Covered233
Our CMS Project233
Building an XML-RPC Server234
Building an XML-RPC Client that Counts Articles239
Building an XML-RPC Client that Searches Articles241
Summary243
10XML and Databases245
XML and Databases245
Why use XML and Databases Together?246
Relational Database? Native XML Database? Somewhere in Between?246
Converting Relational Data to XML249
Using phpMyAdmin to Export XML249
Using mysqldump to Export XML251
Hand-Rolling an XML Converter253
Our CMS Project256
Building the MySQL Table256
Building the PHP257
Setting up a Cron Schedule to Run Periodically259
Summary260
APHP XML Functions261
SAX Functions261
Error Code Constants261
Function Listing262
DOM Functions272
Object Listing272
Function Listing294
SimpleXML Functions294
Function Listing294
SimpleXMLElement Methods295
BCMS Administration Tool297
Picking Up Where We Left Off297
Managing Web Copy297
Web Copy Index Page299
Web Copy Creation Page301
New Web Copy Processing Script303
Web Copy Editing Page305
Web Copy Update Processing Script307
Web Copy Delete Processing Script308
Managing News Items309
News Item Index Page310
News Item Creation Page311
New News Item Processing Script312
News Item Editing Page314
News Item Update Processing Script316
News Item Delete Processing Script317
Managing Authors, Administrators, and Categories318
Managing Authors318
Managing Administrators327
Managing Categories331
Updating the Admin Index Page336
Summary337
Index339

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

No Nonsense XML Web Development with PHP 3 out of 5 based on 0 ratings. 2 reviews.
Guest More than 1 year ago
Based on the title, one might presume that Myer and Marini wrote the book for people who are already familiar with PHP and XML and want to learn some advanced techniques for combining them. What he gets instead are long (relative to the book itself), superficial introductions to PHP and XML and tiny, trivial examples of their combination. Everything in the book is common sense to someone who already knows PHP and XML. What the book teaches to beginners, however, is effectively useless for its superficiality, so I'd discourage anyone, especially beginners, from reading this book, even if he receives it for free. Time also is too valuable to waste on this book. Read 'PHP and MySQL Web Development' by Luke Welling and Laura Thompson and 'XML 1.1 Bible' by Elliotte Rusty Harold. One can visit SitePoint's web site to find a list of their titles and then return to a vendor site to read product reviews. SitePoint books are generally sub-par. This book is no exception.
Guest More than 1 year ago
Do you want to teach yourself XML the easy way? Well, you're in luck! Author Thomas Myer, has done an outstanding job of writing a book that introduces readers to a large part of the XML world, and to walk them, step by step, through the creation of an XML-powered Website. Myer begins by introducing XML. Next, the author introduces you to the XML family, namely XHTML, XML Namespaces, and Extensible Stylesheet Language Transformations (XSLT). Then, he covers DTDs for consistency. The author continues by talking about XSLT and how to use it to transform XML for display in a browser. In addition, the author next covers XSLT in detail. He also shows you how to manipulate XML with client-side tools. Next, the author tackles the server side, specifically addressing the question of PHP 5 as he explores the differences between SAX, DOM, and SimpleXML function libraries for working with XML. Then, he delves into the specifics of the different varieties of RSS that are available, and discusses news aggregators, the parsing of feeds with PHP, and more. The author continues by looking at XML and Web Services. Finally, he considers XML and databases. With the preceding in mind, the author has done an excellent job of presenting the fascinating topic of XML. So, with any luck, XML will serve you well for some time to come!