Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Summation

XML and Perl by Mark Riehl and Ilya Sterin from New Riders, is the second book to deal with this combination. The first, Perl & XML by Erik T. Ray and Jason McIntosh from O'Reilly predates it by a little less than 6 months. Not a stampede by any means, but enough of a buzz to indicate an interest. The latest addition weighs in at 376 pages of reasonably dense text. Of the two books, XML and Perl is both longer (by 174 pages) and more detailed. The more cautious reader will buy both, the cheaper will buy just this one. As always, there is no substitute for hands-on, under-the-hood experience, but even so, this book will be a useful part of the boot-strap process for those coming up to speed in this area.
  • Recommended.
  • Audience: intermediate to advanced.

The Details

With 5 sections and 10 chapters, XML and Perl is the most detailed survey of the field yet published. Is it detailed enough? Hard to say, for some probably yes, for the rest probably not. It all depends on needs and expectations. This isn't a silver platter, but it is a pretty good brunch. Despite the two appendices to the contrary, this book isn't an introduction. The authors clearly state:
“This book is not intended to be your first book on programming, and it is not going to teach you Perl or XML. We assume that the reader has a basic programming knowledge of Perl and an understanding of XML. Our task is to show you how to use these two technologies together. ”

Perhaps someone a bit more picky than I would have suggested that if the authors were serious about the 'basic knowledge and understanding' thing then they should have skipped chapter 1---since it is a brief survey of both Perl and XML. I just look at it as being thorough! That said, the real meat doesn't get served until chapter 2. Even better, it starts at the right end of the table! With what amounts to something on par with 'C's 'hello world\n', they begin with a simple model and use XML::Simple and Data::Dumper to make a solid but still approachable beginning. One of my pet peeves in the world of 'how-tos' and other surveys is that they mostly don't make a reasonable assumption about where to start. Either they begin in the deep end by handing you an anchor and shouting 'SWIM!' or they bore you to death with endless beginner material. XML and Perl makes a pleasant exception to that trend.

Chapter 3 introduces the continental divide of XML, DOM versus SAX. Or more accurately the Document Object Model versus the Simple API for XML. Access by structure or access by event, both have their advantages and disadvantages, as discussed by the authors. Since this is the kind of material that leads rapidly to internecine programmer warfare, they wisely avoid siding with one or the other, making for an even handed introduction to both. One shouldn't take the fact that most of the chapter is about SAX and SAX2 based approaches as an indicator---chapter 4 is devoted to tree-based modules.

Section III goes into some detail on generating XML (useful, having shown you in section II what to do with it) and Section IV is the typical (but still valuable) advanced stuff section. A kind of what's next view of the more complex XML based concepts. I don't mean to blow off the second half of the book---rather think of it as avoiding the 'spoiler' problem inherent in a review! Besides if I'm tired of writing it follows that you should be tired of reading...


Other

Modules Mentioned1

  • Data::Dumper
  • DBD::CSV
  • DBD::MySQL
  • DBI
  • Frontier::RPC
  • SOAP::Lite
  • XML::DBMS>
  • XML::DOM
  • XML::Generator::DBI
  • XML::Handler::YAWriter
  • XML::LibXML
  • XML::LibXSLT
  • XML::NameSpaceSupport
  • XML::Parser::PerlSAX
  • XML::Parser
  • XML::Sablotron>
  • XML::SAX::Expat
  • XML::SAX::PurePerl
  • XML::SAX
  • XML::SAXDriver::CSV
  • XML::SAXDriver::Excel
  • XML::Simple
  • XML::Twig
  • XML::Writer
  • XML::Xerces
  • XML::Xpath

Table of Contents

  1. The Foundation
    1. Basics of XML Processing in Perl
    2. Now Let's Start Digging
  2. Parsing XML Documents Using Perl
    1. Event-Driven Parser Modules
    2. Tree-Based Parser Modules
  3. Generating XML Documents Using Perl Modules
    1. Generating XML Documents from Text Files
    2. Generating XML Documents from Databases
    3. Transforming Miscellaneous Data Formats to XML (and Vice-Versa)
  4. Advanced XML and Perl
    1. XML Transformation and Filtering
    2. AxKit
    3. Perl and XML Web Services
  5. Appendices
    1. What is XML?
    2. Perl Essentials

BibTeX Data

@book{Riehl+Sterin:1,
  author={Mark Riehl and Ilya Sterin},
  title={XML and Perl},
  publisher={New Riders},
  address={Indianapolis, IN},
  edition={1st},
  year={2002},
  ISBN={0735712891},
}

Links

1Hardly exhaustive!
2At the time of this review (2002.11.11.13:50) this link was broken. They don't call it errata for nothing!

In reply to XML and Perl by hsmyers

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found