Have one to sell? Sell yours here
XML Processing with Python (with CD-ROM)
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

XML Processing with Python (with CD-ROM) [Paperback]

Sean McGrath (Author)
2.8 out of 5 stars  See all reviews (11 customer reviews)


Available from these sellers.



Book Description

Charles F. Goldfarb Series on Open Information Management June 15, 2000
Python is the fastest, most productive tool for processing XML. This is the first book to cover XML development with Python, in-depth. XML expert Sean McGrath introduces each of Python's key features, with practical examples demonstrating exactly how to leverage Python in XML development. Install Python and its XML package; then discover the new Pyxie open source project, which provides powerful XML processing libraries for Python. Master XML processing tasks such as stripping tags and reporting on XML document structure. Learn basic Python control structures, functions, data structures, and object techniques; then process XML using regular expressions; event-driven and tree-driven techniques. XML Processing With Python also includes hands-on, practical chapters on SAX and DOM support in Python. The CD-ROM contains complete Python distributions for Windows and Linux, plus extensive source code.

Customers Who Bought This Item Also Bought


Editorial Reviews

From the Inside Flap

Introduction

XML 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 and its drawbacks 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 Book

This 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 Project

This 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 pyxie. It contains all the source code from this book along with more demo programs and applications for Windows and Linux.

There is a mailing list for Pyxie. To subscribe, send e-mail to pyxie-request@starship.python with the word subscribe in the body of the e-mail.

Get involved!1.3 - Prerequisites

This book assumes that you have a high-level understanding of the ideas and syntax of XML. In particular, it would be helpful if you know the following:

What an element is

What start-tags and end-tags look like

What the term "well formed XML" means

What a DTD (Document Type Definition) is for

If you feel the need to brush up your XML, you might like to read my book XML by Example: Building eCommerce Applications available in this series.

This book assumes that you have some previous programming experience in a high-level language. Some exposure to object-oriented programming is desirable but not critical. If you have any exposure at all to the Java programming language, Perl, awk, Tcl, C++, C, JavaScript, Visual Basic, Delphi, or shell scripting languages, you are in good shape to attack this book.

If your programming background is minimal, fear not! Python is a ridiculously easy programming language to learn. Indeed, it makes an excellent first programming language for those approaching the discipline afresh.

If you are a seasoned programmer in one or more languages, I believe you will be pleasantly surprised at how easy, natural, and (okay, I'll say it) beautiful Python is.1.4 - How to Read This Book

This book is intended to be read from start to finish. One of the techniques I have used to avoid long tracts of narrative about Python language features or support libraries is that I explain them as they pop up in the course of writing real programs.

As a consequence, skipping material might lead to gaps in the presentation of Python features. Even if you are very familiar with the subject matter in a section of the book, please give it a high-level scan to ensure that you pick up on any Python nuggets buried inside.

If your background is Java, you might like to read Appendix A before continuing. It introduces Python from a Java programming language perspective. Similarly, you might like to read Appendix B at this point if your background is in the Perl programming language.1.5 - A Note about Platforms

My day-to-day programming environment is a mixture of Windows NT 4.0 and Red Hat Linux 6.0. These are the two platforms that the software presented in this book has been developed and tested on.

Although the book focuses on Windows NT and Linux, the Python programs in the book and in the CD-ROM's root directory should run just fine on any Win32 or Unix platform. There will obviously be the usual assortment of differences to do with default installation directories, differing shells, and so on. I have not attempted to cover all the eventualities in this book. To do so would make it twice as long and ten times more tedious to read.1.7 - And Finally ...

I am a programmer who learns best by example. If this is a reasonable description of how you learn best, you are in the right place.

If you have read this far, you will have surmised that this book is going to take a no-nonsense, snappy, and purposeful approach to XML processing with Python.Ready? Let's go to work ...

From the Back Cover

  • Breakthrough techniques for building XML applications — fast!
  • Includes a detailed Python tutorial
  • Learn about DOM and SAX application development with Python
  • Exclusive coverage of the new Pyxie XML processing library
  • CD-ROM includes Python and Pyxie distributions for Windows NT and Linux—plus powerful utilities and lots of working code
"XML processing is the newest required skill for webmasters and application developers. The Python language and Sean McGrath's book make it fun to learn and easy to do."
— Charles F. Goldfarb

When it comes to XML processing, Python is in a league of its own.

If you're doing XML development without Python, you're wasting time! Python offers outstanding productivity — especially in the areas that matter most to XML developers, such as XML parsing, DOM/SAX implementations, string processing, and Internet APIs.

And now there's Pyxie — the new open source library that makes Python XML processing even easier and more powerful. In XML Processing with Python, top XML developer Sean McGrath delivers the hands-on explanations and examples you need to get results with Python and Pyxie fast — even if you've never used them before!

  • Install Python and the Pyxie XML package
  • Learn the fundamentals of Python: control structures, classes, nested lists, dictionaries, and regular rexpresions
  • Process XML with regular expression-driven, event-driven, and tree-driven techniques
  • Understand Python's support for DOM and SAX APIs
  • Explore the power of Python/XML through worked examples of GUI development, database integration, and an XML query-by-example implementation.

Elegant, easy, powerful and fun, Python helps you build world-class XML applications in less time than you ever imagined. If you know XML, one book has all the techniques, code, and tools you'll need to process it: XML Processing with Python.

CD-ROM INCLUDED

The accompanying CD-ROM contains everything you need to develop XML applications with Python — including

  • complete Python distributions for Windows and Linux
  • the Pyxie open-source libraries
  • powerful utility programs
  • an extensive library of sample source code tested on both Windows NT and Linux

Product Details

  • Paperback: 527 pages
  • Publisher: Prentice Hall PTR (June 15, 2000)
  • Language: English
  • ISBN-10: 0130211192
  • ISBN-13: 978-0130211194
  • Product Dimensions: 9.2 x 7 x 1.4 inches
  • Shipping Weight: 1.8 pounds
  • Average Customer Review: 2.8 out of 5 stars  See all reviews (11 customer reviews)
  • Amazon Best Sellers Rank: #418,129 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

11 Reviews
5 star:
 (3)
4 star:
 (1)
3 star:
 (1)
2 star:
 (3)
1 star:
 (3)
 
 
 
 
 
Average Customer Review
2.8 out of 5 stars (11 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

15 of 15 people found the following review helpful:
3.0 out of 5 stars General Observations, October 18, 2000
This review is from: XML Processing with Python (with CD-ROM) (Paperback)
The book spends a lot of time on Python advocacy and tutorial,which is a good thing, but not why I bought it. Turns out the targetaudience of this book is: programmers comfortable with mark-uplanguages in a general sense who haven't programmed in Python before,but are curious. If you already are a python user looking to find outwhat all these acronymns like XML, DTD, XML SCHEMA, XSL, etc. are,you'll find yourself skipping much of the book and coming awaydisappointed. It spends far more time teaching Python than discussingXML's makeup. If you are a power python user looking for XMLprocessing under the hood, it definitely isn't for you.

This bookintroduces pyxie, an XML processing library, along with the basics ofSAX (Simple Api for XML) and DOM (Document Object Model) XMLprocessing techniques in a fairly concise fashion. Armed with aminimal degree of comfort with mark-up languages like HTML or XML, aprogrammer ready to start processing some actual XML files for thefirst time will find good value in this book.

However, I worry thatthe book may frustrate and/or tick off its target audience, i.e.,Python newbies. This is because much of the code developed in the bookseems rushed out. Whatever the case, you are going to have to debugstuff on the CD. Python is easy to debug and this code is not roughgoing, but it can be tedious and time-consuming if it's something youdidn't plan to reckon with. I'm not convinced that this is altogethera bad thing, since it may prove to be a good way for a python newcomerto get intimate with some handy code. I simply want to make you awareof the situation.

Like a lot of pythoneers, I run Solaris, and Ifound that for non-Linux UNICES the CD offers only C source files fora couple of the book's vital tools. I had to find the requiredlibraries on the web and figure out how to come up with makefilesmyself. Again, tedious and time-consuming. A few hints would have beennice. Linux and Windows folks won't have this problem, as thosebinaries are on CD. Some promised Windows stuff never made it on CD...

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


12 of 13 people found the following review helpful:
1.0 out of 5 stars The author struggled to fill this book, September 25, 2000
By 
A. Lientz "lientz" (Culver City, CA USA) - See all my reviews
(REAL NAME)   
This review is from: XML Processing with Python (with CD-ROM) (Paperback)
The first 250 pages of this book are an introduction to Python and XML. 20 of those are screen shots of the Microsoft installer of Python. Every example begins with type <filename> to fill more space. I think he got the choice of typeface from Curious George Rides a Bike (it allows for 25 lines per page). This should have been a 100 page book with no CD since the code on the CD is all outdated.

There are probably 10 or 15 useful pages in this book for someone who knows anything about Python and XML. I was looking for examples about applying style sheets, parsing examples with database connectivity... anything. All the examples he uses can easily be found on the web in a more concise and clear format.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


9 of 10 people found the following review helpful:
1.0 out of 5 stars Disappointing, November 9, 2000
By 
Greg Broiles (San Jose, CA United States) - See all my reviews
(REAL NAME)   
This review is from: XML Processing with Python (with CD-ROM) (Paperback)
Very little coverage of processing XML documents using Python - plenty of discussion of Python generally, how to use C language utilities to parse XML, how to use awk to modify the output of the C language tools, etc. The book uses a large typeface and includes examples for both Linux and Windows NT screen input/output (which turn out to be nearly identical), so there's not nearly as much content as you might imagine from the page count. I'm relatively new to XML and Python and I spotted two errors in the examples within the first 100 pages. There are two appendices which sound like they're supposed to explain Python to Java and Perl programmers but turn out to be feature comparisons. That's great fodder for flamewars about language superiority, but not a big help for people with experience in other languages seeking a Python jump-start. People who shell out $() for a book on XML and Python don't need a sales pitch about why XML and Python are good choices.

I think this book could have been saved with some help from a good editor; unfortunately, that wasn't done. I can't comment on the CD as I haven't opened its envelope, as this book is being returned as totally unsatisfactory, which I don't do very often.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews









Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Suggested Tags from Similar Products

 (What's this?)
Be the first one to add a relevant tag (keyword that's strongly related to this product).
 
(4)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject