XML Processing with Python with CD-ROM
Authors: Sean McGrath
Venue:  (2000)

From the Book:PREFACE: IntroductionXML is everywhere on the Web these days. Structured data of all shapes and sizes such as financial transactions, news feeds, health care records, even HTML is metamorphosing into XML. There is just no getting away from it!I'm glad actually. The fact that XML is everywhere is a fundamentally good thing in my opinion.Why? Well, thanks to XML, the Web is in transition from an enormous repository of display-oriented, unstructured, low-level data (HTML) into a repository of structured, heterogenous, content-oriented information (XML). This new, improved World Wide Web, housed on a bedrock of XML, presents programmers with awesome opportunities for innovative software development.This suits me just fine because software development is what I like to do--even more than writing books about software development.The fact that the "L" in XML stands for "Language" has been the source of some confusion. It is important to remember that XML is a data representation technology. It is not, by any stretch of the imagination, a programming language. Its strength lies in its ability to simply and cleanly represent complex hierarchical data structures. As you know, XML is a World Wide Web Consortium (W3C) recommendation for structured data representation. There is no such thing as a W3C-recommended XML programming language. Choice of a programming tool is entirely within the hands of the individual developer. In making a selection, an embarrassment of riches presents itself to us. We have the Java programming language, Perl, Tcl, C++, C, JavaScript, Visual Basic, Delphi, and of course Python. Each language has its benefits anditsdrawbacks as an XML-processing tool.How to choose?Well, choosing a programming language is an inexact science at best and is influenced by many factors that are technical, commercial, emotional, futuristic and political in nature. Even serendipity has a role to play.For my part, standing here (actually sitting here) at the start of the 21st century, I can safely say, without fear of contradiction, that no programming language I know comes close to Python for XML processing."Strong words," you may say, but then again, I am only speaking about the languages I know, not the ones I don't.Enough said! We are not here to engage in programming language warsthat is what Usenet is for. Suffice it to say that Python is a solidly engineered, general-purpose programming language with a natural affinity for text processing in general and XML processing in particular. Mix XML and Python together and you have an explosive cocktail of information representation and information processing power.In my opinion . . .1.1 - Purpose of This BookThis book has essentially one purpose: To give you all the information, explanations, working examples, and software packages (on the accompanying CD-ROM) you need to start writing XML-processing applications in Python fast.This book will not slow you down with intricate technical details of either Python or XML. That is not to say that these things are not important! They are very important, but they are not discussed in this book. The reason for this omission is that I believe a pragmatic treatment of a subject such as Python/XML is the best way to become productive quickly. I believe that comprehensive coverage of the details too early on in the exploration of a topic like this just gets in the way. So, in this book, comprehensive coverage takes second place to working examples of real-world Python/XML programming. I will provide plenty of pointers to more detailed information for those of you who wish to dig deeper.1.2 - The Pyxie Open Source ProjectThis book heralds the beginning of the Pyxie projectan Open Source software development initiative aimed at fully developing Python's potential as an XML-processing platform.By the time you read this, the Pyxie project will have been launched at ...