Exercises


  1. Modify the XML::Twig example shown in Listing 4.9 to also parse the <department_name> elements and include them as part of the output report. Is it easy to retrieve another element earlier in the path ?

  2. Find or build a large XML document (at least several MB) and use the Perl Benchmark module to compare parsing times of the various DOM modules. If we needed to extract only a portion of an XML document, is the XML::Twig XPath like mode much faster? How much faster?

For suggested solutions to this exercise, be sure to check out the web site: http://www.xmlproj.com/book/chapter4.



XML and Perl
XML and Perl
ISBN: 0735712891
EAN: 2147483647
Year: 2002
Pages: 145

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net