ebook img

XML Processing with Perl, Python, and PHP PDF

447 Pages·2001·3.811 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview XML Processing with Perl, Python, and PHP

XML Processing with Perl™, Python, and PHP Martin C. Brown SYBEX® 4021fm.qxd 11/2/01 4:27 PM Page i XML Processing with Perl, Python, and PHP This page intentionally left blank 4021fm.qxd 11/2/01 4:27 PM Page iii XML Processing with Perl, Python, and PHP ™ Martin C. Brown San Francisco • London 4021fm.qxd 11/2/01 4:27 PM Page iv Associate Publisher: Richard Mills The author and publisher have made their best efforts to prepare Acquisitions and Developmental Editor: Tom Cirtin this book, and the content is based upon final release software Editor: Gene Redding whenever possible. Portions of the manuscript may be based upon Production Editor: Jennifer Campbell pre-release versions supplied by software manufacturer(s). The Technical Editor: Charles Hornberger author and the publisher make no representation or warranties of Graphic Illustrator: Tony Jonick any kind with regard to the completeness or accuracy of the con- Compositor: Franz Baumhackl tents herein and accept no liability of any kind including but not Proofreaders: Emily Hsuan, Nancy Riddiough limited to performance, merchantability, fitness for any particular Indexer: Nancy Guenther purpose, or any losses or damages of any kind caused or alleged to Cover Designer: Caryl Gorska, Gorska Design be caused directly or indirectly from this book. Cover Photograph: Tony Stone Manufactured in the United States of America Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this pub- 10 9 8 7 6 5 4 3 2 1 lication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic, or other record, without the prior agree- ment and written permission of the publisher. Library of Congress Card Number: 2001094603 ISBN: 0-7821-4021-1 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries. Screen reproductions produced with xv. xv © 1994 John Bradley. All rights reserved. Netscape Communications, the Netscape Communications logo, Netscape, and Netscape Navigator are trademarks of Netscape Communications Corporation. Netscape Communications Corporation has not authorized, spon- sored, endorsed, or approved this publication and is not responsible for its content. Netscape and the Netscape Communications Cor- porate Logos are trademarks and trade names of Netscape Com- munications Corporation. All other product names and/or logos are trademarks of their respective owners. Internet screen shot(s) using Microsoft Internet Explorer 5 reprinted by permission from Microsoft Corporation. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by fol- lowing the capitalization style used by the manufacturer. 4021fm.qxd 11/2/01 4:27 PM Page v To Sharon, always. This page intentionally left blank 4021fm.qxd 11/2/01 4:27 PM Page vii Acknowledgments F irst, I must thank Tom Cirtin, who originally offered me the book on the basis of a brief conversation at the beginning of the year. I also need to thank Jennifer Campbell, who took over and managed the project after the initial stages. It’s been a long process with occa- sional difficulties, but the people at Sybex were wonderful throughout the course of this project. I also need to thank Gene Redding, who copy edited the book for me—after almost five years of writing, I’m still not as good as I could be. For the technical input, thanks go to Charles Hornberger for highlighting missed opportunities and less-than-perfect examples. Big thanks also have to go to all the people who do the work behind the scenes and pro- duce the modules, extensions, and examples that make up this book. This includes—but in no way is limited to—James Clarke, the folks at Late Night Software, Apple Computer, Inc., Scriptics, Larry Wall and the Perl team, Guido van Rossum, Fredrik Lundh, and the rest of the Python and PyXML teams and the folks who work on PHP, Ruby, and Rebol. There’s also a very special thanks to the people out there who helped me deal with the events of September 11, 2001, which occurred during the writing of this book. My heart goes out to anybody whose family was touched by the tragedies. Whilst neither I nor any of my family or friends were involved in the events on that day, many of the people I know and work with were. In particular, thanks and best wishes to Wendy Rinaldi, Rikke Jørgensen, and Aharon Robbins. The penultimate thanks go to Neil Salkind and Vicki Harding, my agents, and to the rest of the team at StudioB for keeping all my contracts, negotiations, and checks in order. Finally, the biggest thanks should go to my wife. I would be lost without her, and all too often she has to listen to my complaints and frustrations without any thanks or appreciation. 4021fm.qxd 11/2/01 4:27 PM Page viii Contents at a Glance Introduction xxi Part I Applying XML 1 Chapter 1: Introduction to XML 3 Chapter 2 Fundamentals of XML 11 Chapter 3 Data Type Definitions (DTDs) 23 Chapter 4 Applying XML with Scripting Languages 35 Chapter 5 Data Exchange and XML 47 Part II XML and Perl 61 Chapter 6 XML Solutions in Perl 63 Chapter 7 Perl and Unicode 87 Chapter 8 Generating and Parsing XML Documents with Perl 97 Chapter 9 Converting XML Documents Using Perl 119 Chapter 10 Applying SOAP/XML-RPC in Perl 147 Part III XML and Python 167 Chapter 11 XML Solutions in Python 169 Chapter 12 Python and Unicode 187 Chapter 13 Generating and Parsing XML Documents with Python 197 4021fm.qxd 11/2/01 4:27 PM Page ix Chapter 14 Converting XML Documents Using Python 209 Chapter 15 Applying SOAP/XML-RPC in Python 225 Chapter 16 Zope and XML Documents 243 Part IV XML and PHP 263 Chapter 17 XML and PHP 265 Chapter 18 Developing XML Applications with PHP 287 Chapter 19 PHP and XML-RPC 305 Part V XML and Other Languages 319 Chapter 20 XML and REBOL 321 Chapter 21 XML and Ruby 329 Chapter 22 XML and Tcl 341 Chapter 23 AppleScript and XML 359 Appendices Appendix A Unicode Quick Reference 377 Appendix B Resource Guide 393 Index 403

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.