XML technologies / XML / Python & XML
(Excerpt from “Python & XML” by Christopher A. Jones & Fred L. Drake, Jr.)
This book is a collaboration between two authors interested in the subject for very different reasons. We hope you will understand what each contributes and, not least, find it a little entertaining.
Chris Jones started working with XML several years ago and has used Python only recently. He first used XML in 1997, initially as a consultant around Seattle, as the core format for website content in a home-built publishing system. He became enthusiastic while developing an open-source engine as a key component for Planet 7 Technologies. As a consultant, he still uses XML almost daily for everything from configuration files to document formats.
Chris began exploring Python because it seemed a clean, object-oriented alternative to Perl. A longtime Unix user, though often working on Windows in Seattle, he became familiar with scripting languages giving full Unix API access. After years of web development using far too much Java and ASP, Python offered a refreshing way to retain object orientation without abandoning Unix sockets and threads, combined with scripting convenience.
Python and XML form a powerful combination. XML is a powerful technology requiring work with objects, interfaces and strings. Python does too, making it an excellent XML companion. Python’s XML tools keep growing, and Chris can build XML solutions much faster in Python than Java or C++. Platform independence keeps the work consistently usable across Windows, Linux and other Unix systems. Both authors find this combination particularly powerful.
Fred Drake arrived differently: Python first, then XML. He discovered Python while experimenting with languages at university. Recognizing its rapid-development strengths, he persuaded his supervisors to let him use it for his final project. During that project, he became interested in the community and contributed to the standard library. A CNRI research group working on distributed systems noticed him. Led by Python creator Guido van Rossum, the group welcomed Fred, who enthusiastically learned more about distributed systems and gluing systems together than he had thought possible.
While still at university, Fred proposed converting Python’s documentation to the more structured language SGML. After several years at CNRI he began doing so, diving much deeper into the documentation. As XML gained acceptance, the SGML migration became an XML migration. Although not yet complete—he is still working on it—Fred substantially changed documentation maintenance, making it one of the most structured applications of Donald Knuth and Leslie Lamport’s LaTeX typesetting and markup system.
Over time, the CNRI team focused increasingly on Python development and decided to form PythonLabs. Fred remained active in Python XML initiatives and pushed for standard-library XML support. Once achieved, he returned to migrating the documentation and hopes to finish soon.
Audience
These pages are for anyone learning to build XML applications with Python. Most material targets programmers using XML for data exchange or transformable web content, but the first half also benefits those interested in document-oriented applications generally.
No XML knowledge is assumed. We do expect enough Python experience to read ordinary code, but you need not be a guru. Without basic Python, consult an introductory book such as Learning Python by Mark Lutz and David Ascher (O’Reilly, 1999). Web application sections benefit from familiarity with HTTP and HTML forms, but provide enough information for simple CGI scripting.
Copyright © 2002 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “Python & XML” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de