The XML::Parser "tree" Style
use XML::Parser;

$p = new XML::Parser Style => 'tree';

parsefile $p 'Beginning.xml';

require 'dumpvar.pl';
dumpvar('main', 'p');
=========================================
$p = XML::Parser=HASH(0x80fb144)
   'Parser' => 135366672
   'Pkg' => 'main'
   'RawEvents' => 'XML::Parser::Tree'
   'Style' => 'tree'
   'Tree' => ARRAY(0x80cec3c)
      0  'tstmt'
      1  ARRAY(0x8128690)
         0  HASH(0x8128678)
              empty hash
         1  'ttitle'
         2  ARRAY(0x81286f0)
            0  HASH(0x81286d8)
                 empty hash
            1  0
            2  'The Old Testament'
         3  0
         4  '
'
         5  'fm'
         6  ARRAY(0x81287c8)
            0  HASH(0x81287b0)
                 empty hash
            1  0
            2  '
'
            3  'p'
            4  ARRAY(0x811a11c)
               0  HASH(0x811a104)
                    empty hash
               1  0
               2  'Source of original ASCII files unknown.'
            5  0
            6  '
'
            7  'p'
            8  ARRAY(0x811a1f4)
               0  HASH(0x811a1dc)
                    empty hash
               1  0
               2  'SGML markup by Jon Bosak, 1992-1994.'
            9  0
            10  '
'
            11  'p'
            12  ARRAY(0x811a2cc)
               0  HASH(0x811a2b4)
                    empty hash
               1  0
               2  'XML version by Jon Bosak, 1996-1998.'
            13  0
            14  '
'
            15  'p'
            16  ARRAY(0x811a3a4)
               0  HASH(0x811a38c)
                    empty hash
               1  0
               2  'This work may be freely distributed internationally.'
            17  0
            18  '
'
         7  0
         8  '
'
         9  'book'
         10  ARRAY(0x812332c)
            0  HASH(0x811a4c4)
               'title' => 'Genesis'
            1  0
            2  '
'
            3  'bktlong'
            4  ARRAY(0x81233bc)
               0  HASH(0x81233a4)
                    empty hash
               1  0
               2  'The First Book of Moses, Called GENESIS.'
            5  0
            6  '
'
            7  'chapter'
            8  ARRAY(0x81234b8)
               0  HASH(0x8123494)
                  'n' => 1
               1  0
               2  '
'
               3  'v'
               4  ARRAY(0x812356c)
                  0  HASH(0x8123548)
                     'n' => 1
                  1  'p'
                  2  ARRAY(0x81235cc)
                     0  HASH(0x81235b4)
                          empty hash
                     1  0
                     2  'In the beginning God created the heaven and the earth.'
                     3  0
                     4  '
'
               5  0
               6  '
'
            9  0
            10  '
'
         11  0
         12  '
'
   'Userdata' => 135369360
Title Page Road Map Who Am I? Where To Get This Talk What is Markup? Three Kinds of Markup No Markup Procedural Markup Descriptive Markup On Markup Why Descriptive Markup is Good For You What is XML? This Isn't XML This is Well-Formed XML This is Valid XML Valid XML, but Better XML: History and Politics XML: Design Goals XML From 50,000 Feet Where to Find Out About XML XML Terminology 1 XML Terminology 2 How Does Unicode Work? The Unicode Spectrum Unicode for Programmers Unicode and XML Why Should You Use XML? Recently I Set Up a Linux Box Recently I Set up a Linux Box Recently I Set Up a Linux Box Recently I Set Up a Linux Box Recently I Set Up a Linux Box Recently I Set Up a Linux Box About Syntax Why is the Web So Slow? Today's Browser Architecture The Document Object Model The Next-Gen Browser Metadata Model + XML Syntax = RDF Who Loves XML? How Can You Use XML in Perl? The expat XML Processor The XML::Parser Package Some Test Data The XML::Parser The XML::Parser The XML::Parser The XML::Parser The XML::Parser Some Larger Test Data The The The The The The The The The And A Parting Question Match? Match? Match? Match? Match? Match?