You are previewing XML and Perl.
O'Reilly logo
XML and Perl

Book Description

If you are a Perl programmer looking to explore Perl's XML capabilities or an XML developer with a basic understanding of Perl, this book will provide you with all the tools required for XML processing with Perl. XML and Perl teaches you to create portable, powerful, and extensible applications when you use XML and Perl together. You'll also learn to customize your XML processing facilities to accomplish unique tasks.

Authors Mark Riehl and Ilya Sterin, who have written Perl XML modules and administer the official Perl XML web site (www.perlxml.net), have filled this book with practical code samples and exercises that will help you test drive your new knowledge. With this book, you'll quickly see the advantages of using XML and Perl together, and you'll be able to perform even complicated tasks more easily with powerful Perl XML modules.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewers
  4. Acknowledgments
  5. Tell Us What You Think
  6. Introduction
  7. The Foundation
    1. Basics of XML Processing in Perl
      1. Chapter Roadmap
      2. XML—What Is It and Why Should I Use It?
      3. What Can I Do with XML?
      4. What Is Perl?
      5. And That’s Not All
      6. Summary
    2. Now Let’s Start Digging
      1. Chapter Roadmap
      2. What Is XML Processing?
      3. XML Parser Paradigms
      4. Parsing an XML Document and Extracting Statistics
      5. Generating XML Documents
      6. Searching XML Documents
      7. Transforming XML Documents
      8. Our First Perl XML Programs
      9. The Problem: Generating and Parsing an XML Document
      10. Summary
      11. Exercise
  8. Parsing XML Documents Using Perl
    1. Event-Driven Parser Modules
      1. Chapter Roadmap
      2. What Are the Major Approaches to XML Parsing?
      3. Advantages of Event-Driven Parsers
      4. Disadvantages of Event-Driven Parsers
      5. What Is a Sequential Access Event-Driven XML Parser?
      6. XML::Parser Perl Module
      7. SAX1—Simple API for XML Version 1
      8. SAX2
      9. Summary
      10. Exercises
      11. Relevant Links
    2. Tree-Based Parser Modules
      1. Chapter Roadmap
      2. What Is a Tree-Based XML Parser?
      3. Tree-Based XML Parser Modules
      4. What Is the Document Object Model?
      5. DOM-Based XML Parser Modules
      6. Summary
      7. Exercises
      8. Relevant Links
  9. Generating XML Documents Using Perl Modules
    1. Generating XML Documents from Text Files
      1. Chapter Roadmap
      2. Introduction to XML Generation
      3. Different Methods of Generating XML Data
      4. Examples of XML Document Generation
      5. Summary
      6. Exercise
    2. Generating XML Documents from Databases
      1. Chapter Roadmap
      2. Why Store Data in XML?
      3. Introduction to the Perl Database Interface
      4. XML::Generator::DBI Perl Module
      5. XML::DBMS Perl Module
      6. Summary
      7. Exercises
      8. Relevant Links
    3. Transforming Miscellaneous Data Formats to XML (and Vice-Versa)
      1. Chapter Roadmap
      2. Why Convert Another Data Format to XML?
      3. XML::SAXDriver::CSV Perl Module
      4. XML::SAXDriver::Excel Perl Module
      5. Developing a Custom Event Handler
      6. Summary
      7. Exercises
  10. Advanced XML and Perl
    1. XML Transformation and Filtering
      1. Chapter Roadmap
      2. XSLT Introduction
      3. XML::XPath Perl Module
      4. XML::LibXSLT Perl Module
      5. XML::Sablotron Perl Module
      6. Summary
      7. Exercises
      8. Relevant Links
    2. AxKit
      1. Chapter Roadmap
      2. Serving Web Content with AxKit
      3. Installing the Required Software
      4. Making the Content for Delivery
      5. Additional AxKit Tools
      6. Summary
      7. Exercise
      8. Relevant Links
    3. Perl and XML Web Services
      1. Chapter Roadmap
      2. What Are Web Services?
      3. Summary
      4. Exercises
      5. Relevant Links
  11. Appendices
    1. What Is XML?
      1. Introduction to the eXtensible Markup Language
      2. History of XML
      3. What Exactly Is XML?
      4. Components of an XML Document
      5. Defining the Structure and Content of an XML Document
      6. Additional Sources of XML Information
    2. Perl Essentials
      1. Perl Module Installation
  12. Acronym List
  13. References
    1. Books
    2. RFC 2616—HyperText Transfer Protocol
    3. WML
  14. Glossary
  15. Index