Processing XML efficiently with Perl and XML::Twig
by Michel Rodriguez
updated 2003-03-31
Table of Content
- 1. Introduction
- 2. Introduction to XML
- 3. Introduction to XML::Twig
- 4. First Examples
- 5. Data base integration
- 6. Other features
- 7. Advanced features
- 8. Under the hood
- 9. Reference
Code Examples
ex1_1.pl: Reordering an XML file
ex1_2.pl: Creating a new element
ex1_3.pl: Using twig_handlers
ex1_4.pl: Using the flush method
ex1_5.pl: Using the purge method
ex1_7.pl: Using the twig_print_outside_roots option
ex1_9.pl: Using path instead of gi's
ex2_1.pl: Including a relationnal table in an XML document
ex2_2.pl: Including values from a relationnal table in an XML document
ex2_3.pl: Including values from a relationnal table in an XML document (alt)
ex2_4.pl: Dumping an XML table into a data base table
ex3_1.pl: Using the finish method
ex3_2.pl: Using the finish_print method
ex3_3.pl: Using set_id
ex3_4.pl: using elt_id
ex3_5.pl: Using before and after
ex3_6.pl: Using next_elt
ex3_7.pl: Pretty printing a document
ex3_8.pl: Pretty printing a table
ex4_0.pl: Using StartTagHandlers
ex4_1.pl: Purging part of the tree
xml2html1.pl: A simple HTML+ converter