Perl and XML
Publisher: O'Reilly Media
Final Release Date: April 2002
Pages: 218

XML is a text-based markup language that has taken the programming world by storm. More powerful than HTML yet less demanding than SGML, XML has proven itself to be flexible and resilient. XML is the perfect tool for formatting documents with even the smallest bit of complexity, from Web pages to legal contracts to books. However, XML has also proven itself to be indispensable for organizing and conveying other sorts of data as well, thus its central role in web services like SOAP and XML-RPC.As the Perl programming language was tailor-made for manipulating text, few people have disputed the fact that Perl and XML are perfectly suited for one another. The only question has been what's the best way to do it. That's where this book comes in.Perl & XML is aimed at Perl programmers who need to work with XML documents and data. The book covers all the major modules for XML processing in Perl, including XML::Simple, XML::Parser, XML::LibXML, XML::XPath, XML::Writer, XML::Pyx, XML::Parser::PerlSAX, XML::SAX, XML::SimpleObject, XML::TreeBuilder, XML::Grove, XML::DOM, XML::RSS, XML::Generator::DBI, and SOAP::Lite. But this book is more than just a listing of modules; it gives a complete, comprehensive tour of the landscape of Perl and XML, making sense of the myriad of modules, terminology, and techniques.This book covers:

  • parsing XML documents and writing them out again
  • working with event streams and SAX
  • tree processing and the Document Object Model
  • advanced tree processing with XPath and XSLT
Most valuably, the last two chapters of Perl & XML give complete examples of XML applications, pulling together all the tools at your disposal. All together, Perl & XML is the single book that gives you a solid grounding in XML processing with Perl.
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyPerl and XML
 
4.3

(based on 7 reviews)

Ratings Distribution

  • 5 Stars

     

    (4)

  • 4 Stars

     

    (1)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 7 customers

Sort by

Displaying reviews 1-7

Back to top

 
5.0

XML for Perl Programmers

By Joshua Wait

from Undisclosed

Comments about oreilly Perl and XML:

XML has begun to appear everywhere. XML has long served in hidden roles on servers and in configuration files. Microsoft Word 2003 for Windows now supports reading and writing XML to in it's wordprocessingML format. Unlike MS Word's horrible "Save As Web Page" feature, wordprocessingML, or wordML for short, is a clean usable format. The adoption of XML in a user space as common as MS Word in an accessible format means that developers have a rich opportunity in XML.

The book Perl and XML focuses on the where Perl and XML meet. In asking the questions "Why Perl?", the authors Erik Ray and Jason McIntosh point to Perl's ability to handle text, strings, and regular expressions. The authors also point out in a clear and concise manner the strengths of XML as a means for structuring data.

The book focuses on working with XML using Perl. Tutorials of the basics of either language are best found in another book. The author of the book recommends Learning Perl for those people starting out in Perl. The book does not assume much knowledge of XML, so it's really an XML book for Perl programmers. If you'd like a more in depth discussion of XML, you might check out Erik Ray's Learning XML.

Surveying many conventional XML tools and applications, the book addresses big picture items such as tree processing and streams as well as specific items such as RSS and SOAP. Approaching XML from both a practical point of view and strategic point of view, the author provides detailed examples and observes which strategies work well for handling XML in Perl.

Originally, I picked up Perl and XML to address a couple of small projects where I had to deal with XML. The examples in Perl and XML were well written and provided the information I needed to try out common Perl tools for handling XML. Unfortunately, I found that XML processing in Perl was unacceptably slow for the two projects I had at hand. In a short amount of time, I hacked together a faster solution without relying on an XML parser. That said, I gleaned a great deal from Perl and XML which I imagine I will be putting to use soon.

If you're not currently working with XML, you may find yourself working sooner than you think. I couldn't more highly recommend Perl and XML for thorough treatment of the subject even if you end up hacking your own solution.

 
4.0

Perl & XML Review

By Dave Bower

from Undisclosed

Comments about oreilly Perl and XML:

Really outstanding through the first half of chapter 5, with good, working examples. It really would have been more helpful to include a more typical, "vanilla" example of how to use an XML::SAX parser on an XML document, rather than the web log driver that was illustrated.

 
5.0

Perl & XML Review

By Kevin Kinnell

from Undisclosed

Comments about oreilly Perl and XML:

Finally. Cuts right through the clutter and delivers what you need to do XML with Perl. I have three 600+ page books on XML (and no time to read 'em) but with this 194 page gem (and the XML pocket ref) I can actually "do stuff."

 
3.0

Perl & XML Review

By Dominic Mitchell

from Undisclosed

Comments about oreilly Perl and XML:

Overall, pretty good as far as it goes. I'm glad it doesn't even attempt to include a Perl tutorial. The progression through the stages of XML processing is very good, building up from simple parsers through to SAX and on to DOM. There is lots of example code to explain things in practical terms. The book itself is just the right size (not too short, but not of epic [and unreadable-in-the-bath] proportions).

Unfortunately, I have a couple of gripes, too:



The index doesn't appear to be complete. I immediately looked up XML::Twig in there when I got it and it was lacking. I'm now nervous about it missing other things.

The coverage of SAX is very skewed towards the first edition of Perl SAX. Whilst I understand the need to cover this, XML::SAX is much more useful these days. I do realise that this is a moving target though. :-/

On XML::SAX again, one of the most important features was entirely skipped, without even a mention: SAX Filters. This is the XML equivalent of Unix pipelines and makes XML enormously easy to use in a nice componentized fashion. A brief glimpse of XML::SAX::Machines would have been a very worthwhile inclusion.

Unfortunately for a book on XML, many of the ampersands in program listings aren't correct. There are many examples like s/&/&/g (which should be s/&/&/g). Example 4-4 (sub handle_char_data) shows this. Example 3-1 is also particularly broken in its regexes.



Despite the above complaints, I still find this a good book for explaining to Perl programmers what XML is and how it should be used in Perl.

(1 of 1 customers found this review helpful)

 
3.0

Perl & XML Review

By Chris Riley

from Undisclosed

Comments about oreilly Perl and XML:

A good book giving an introduction to the different modules you'll need to know. However, it fails to fill the void of a Perl XML reference manual. I needed something to explain all the ins and outs of XPath, and this just glosses the surface. This book includes much needed information on XPath expressions, but doesn't explain all the methods and things to watch out for.

In short, a good book to let you know what modules you need, but doesn't get to the meat of the modules.

At a minimum I'd want an appendix with all the man pages. But real explanations and hints would be better.

 
5.0

Perl & XML Review

By Charlie Rogers

from Undisclosed

Comments about oreilly Perl and XML:

The book I've been waiting for! Compact, concise and cogent.

The exposition of often knotty and gnarled syntax and semantics is extremely lucid and precise. The authors often succeed in capturing the essence of a technique or procedure in a single well-crafted paragraph - even a sentence!

The examples are excellent - brief, well-focussed and relevant. As the authors state on p38 "we hope to shave some of the mystique off of XML processing - at the end of the day it's just pushing text around". And I think they (and Perl) succeed triumphantly.

Compared with most of the meandering, bloated and badly-written books abounding in the XML arena "Perl and XML" is a model production - and has less than 200 pages!

 
5.0

Perl & XML Review

By Justin Case

from Undisclosed

Comments about oreilly Perl and XML:

My favorite scripting language, PERL, gets my favorite animal on the cover, Monkeys Monkeys Monkeys!

Displaying reviews 1-7

Back to top

 
Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook: $31.99
Formats:  DAISY, ePub, Mobi, PDF
Print & Ebook: $43.99
Print: $39.99