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 |