Perl and XML
With qualities like these, one might think that the marriage of Perl and XML would be total bliss, and the two languages would live happily ever after. In reality, however, the marriage has been far from perfect, and has produced an enormous number of kids: some uglier, some prettier, some simpler, some more sophisticated. Perl & XML is a good attempt to provide an overview of XML processing techniques existing nowadays in the Perl world.
The book does not even make an attempt to give you a brief introduction to Perl, and thus eliminates the weak point of trying to be another Camel book, as many publications in the field attempt to do. The logical assumption is that you know Perl and have heard something about XML. The first chapter of the book tells you why there are so many variations of Perl modules for XML processing, who is behind the well-known modules and why the interaction of Perl with XML has been rather disorganized. Indeed, a short visit to the XML section of CPAN brings up dozens of available modules, most of which characterized by some intimidating or non-descriptive names like SAX, Grove, YAWriter, etc.
The second chapter is titled "XML Recap"; the contents of the chapter, though, are good enough to be called "Concise but Informative Introduction to XML". Don't get your expectations too high -- O'Reilly has a whole bundle of books related just to learning XML, and thus a single chapter can barely touch the surface of what you might need to know, but it provides a good introduction to the world of markup, elements, namespaces, character encoding, processing instructions, schemas and transformations in XML.
Chapter 3 goes from theory to practice, and gives the reader an opportunity to try his first Perl script on XML data. The parsers covered in this chapter are XML::Parser, XML::LibXML, XML::XPath and XML::Writer. Document validation and well-formedness are also explained, and luckily enough this exact chapter is what O'Reilly Publishing decided to publish as a free chapter available on the Web. In this chapter, the authors make a distinction between stream-based and tree-based XML processing, and thus it doesn't come as a big surprise that the next four chapters are dedicated to examples of such processing.
Chapter 4, Event Streams, discusses the issues of processing XML document as a stream of data, where your application has to react to various input without really knowing where the end of the document is. XML::PYX and XML::Parser are covered in this chapter.
Chapter 5 shows examples of using SAX for XML processing with Perl, and also provides an overview of SAX history, which in a nutshell tells you that SAX has been designed for Java with its strong type checking and interface classes. It goes to explain that using it in Perl, which is known for its forgiving nature, thus requires a certain responsibility on the part of programmer. XML::Handler::YAWriter is also discussed in this chapter.
From stream processing, the authors take you to parsing XML trees. In this case, the document is assumed to be loaded into memory and Perl script can safely assume that the whole XML document has been loaded. XML::Simple, XML::SimpleObject, XML::TreeBuilder and XML::Grove are discussed in this chapter, with XML::Parser revisited.
DOM (Document Object Model) is another standard recommended by W3C and it is mostly concerned with how an XML document is stored in computer's memory. XML::DOM is discussed in this chapter with XML::LibXML revisited. The authors also provide a good overview of DOM standard.
The last three chapters deal with applications of Perl in XML data processing that go beyond stream and tree processing -- XPath and XSLT are explained with copious examples. Remember though, that both technologies have several-hundred-page books written about them, and thus several pages in a Perl and XML book can serve at best as good introduction. Chapter 9 deals with RSS and writing SOAP with Perl and XML, with XML::RSS and SOAP::Lite being explained. The last chapter deals with such issues as namespacing, subclassing and for Web designers provides a handy tutorial on converting your XML data into HTML via XSLT stylesheets.
The table of contents is posted on the publisher's Web site.
The first three chapters of the book are easy to read, since they provide a general overview of the data-processing world, history of XML with reference to appropriate events in the Perl community. However, data processing can hardly be called an exciting topic and thus bulk of the book is about routinely introducing particular modules, telling you what you can do with each, and then giving you an example of Perl code processing some XML document. The examples are apt and relate to some of data processing that some us had to do, i.e. shopping lists, address books, recipes, diaries of mad professors, etc.
The code examples are numerous, and if you get tired after looking at pages and pages of Perl lines, you better plan accordingly, as sometimes the subchapter consists of nothing more than an XML file and related Perl processing code with author's notes. For a 200-page book Perl and XML provides a great introduction into the area, provided you have good knowledge of Perl, using CPAN modules and just general knowledge about data processing. The book would probably have a more exact title if it had the word "Cookbook" in its name -- some might consider it a good reference. However, for those just getting acquainted with XML, another tutorial might be needed to get a full comprehension of XML's power.
You can purchase Perl & XML from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Wasn't there already another one of these fucking camel book reviews this week?
smalltalk rulz!!! bumridders!!
Sploshing...What ever happened to Katz?
Ahr doo ble eee ass ?
10) e is less challenging to spell than pi.
.
9) e ~=2.718281828459045, which can be easily memorized to its billionth place, whereas pi needs "skills" to be memorized.
8) The character for e is so cheap that it can be found on a keyboard. But is special (it's under "special symbols" in word processor programs.)
7) Pi is the bigger piece of pie.
6) e has an easy limit definition and infinite series. The limit definition of pi and the infinite series are much harder.
5) e you understand what it is even though you start learning it late when you're in pre-calculus. But pi, even after five or six years it's still hard to know what it really is.
4) People mistakenly confuse Euler's Number (e) with Euler's Constant (gamma). There is no confusion with the one and only
3) e is named after a person, but pi stands for itself.
2) Pi is much shorter and easier to say than "Euler's Number".
1) To read pi, you don't have to know that Euler's name is really pronounced Oiler.
I wish /. would quit trying to disguise advertisements as articles.
"I'm just here to regulate funkiness."
Review of the same book from a little over a month ago...
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
Enough is enough. There is way too much reviews about perl lately. Perl is fine for single developer, heavenly might some say. But for team projects it's hell in disguise.
I agree with everything this review says.
I'm a good drone!
perl good microsoft bad
chat it with me fellow drones!
It does a great job of covering the intricacies of both Perl and XML--how to use them separately, how to use them together and how to use them to solve problems. It also does a great job of exposing the flaws of each language and for this reason it is bound to put itself "out of a job". The author correctly points out that Perl is best suited for quick, unmaintainable hacks and not serious, large-scale engineering. And XML, as he notes, it bloated by ivory-tower academic requirements and has made (and will make) zero headway in the Real World.
My recommendation is to borrow the book at the library, because when these dead-end technologies reach end-of-life it won't be very useful anymore.
The same book was reviewed by slashdot over a month ago? NAAHHHHH!!!
It's so good, it gets two reviews!
This isn't as much "normalization" as it is "don't take so many drugs when you're designing tables."
I thought Perl's name suggested that it was good at being pathologically eclectic and rubbish listing.
Is this book anything like this book with the same name and authors. This one's published by O'Reilly, the other was published by some group called O'Reilly and Associates. Hmmm maybe that's the difference.
.NET all the way... can spray paint your car on demand! HOW ABOUT THAT! the age we live in. :o
I agree fully, I have also read the book and come to the same conclusions. Perl is good for writing quick and dirty scripts but is not suited for a real site.
Personally I am more impressed with microsofts script language, called batch processing (.bat files) and I would like to see this used more for internet applications.
This review is "Perl and XML". The other review was "Perl & XML". Big difference.
Does XML make Perl obsolete or Perl makes XML obsolete.
Je t'aime Stéphanie
Sen. Fritz Hollings (D-South Carolina) proposed legislation that would put restrictive security chips in every piece of new hardware. Sen. Joe Biden (D-Delaware) offered a bill that would make it illegal to remove a digital watermark from any media file, even if it interferes with the file's use. Rep. Howard Berman (D-California) introduced a measure that would allow companies to block people from trading files they believe to be pirated. What do these three fine legislators have in common?
So, will PERL programs will now be able to be written in XML and appear more logical and well-structured???
Off Topic -
Currently there is a global DOS attack on all whois servers from all registrars.
10 echo "To be or not"
20 goto 10
Its a shame, because Jason McIntosh can write well and he is a decent coder. But he moved out of the apartment 3 months ago and we still find stuff of his lying around.
Jason, please come by and pick up your "Infocom's greatest hits" and your various Mac
connector cables. The lease is up soon. yadda yadda nag nag nag.
www.cgisecurity.com/lib
It's also dumb to have any introductory XML material if you're not going to be serious about it. Which gives me an excuse to plug my favorite XML for beginners book, Harold's XML Bible, 2nd edition. Yeah, stupid title (who are you, Moses?), and the CD-ROM is badly put together (you'll need to convert some text files from Mac format!). But the book itself is very good. No assumptions at all about previous knowledge If you know jack about XML, or you understand the basics, but can't figure out how it's used, this is the book you want.
When did /. switch to publishing in Win-1252 charset? I hate to see those ?s everywhere. Not everyone is using IE.
So, Perl is optimized for quick and dirty problems. The kind in which you know in advance you won't be maintaining it, and don't need a solid, easily-maintained language.
And XML is a sophisticated mechanism for describing data for when a simple pipe-delimited file format won't achieve a sufficient buzzword high. It's so powerful that this book doesn't even go into detail on learning XML - the reviewer recommends additional books for really getting to understand XML, should you desire to replac the fast & easy delimited format.
Oh yeah, sounds like a match made in heaven.
Q: "What do these three fine legislators have in common?"
A: They all belong to a party representing a diverse constituency.
I don't like these guys on tech issues, but then the Democratic party has never had a united front or a singular coherent social or economic agenda.
If that's what you're looking for, go with the homogeneic party that represents wealthy (or at least selfish), christian, socially conservative white people. Fortunately for favored Republican constituencies, there are a lot of *voters* in America who meet that narrow criteria.
Show me use cases, styles, patterns and examples of developing web applications with AxKit. Same about Redland, which suffers from the lack of documentation.
This book just repeats about XML what was already said in other books.
Less is more !
Juiz de Fora IRC fotos
I wonder if this book was ever reviewed before??? Its strange to think that more than one person would want to review the same book. Theres gotta be patent laws against that or something. Right?