Skip to Content
XML and Perl
book

XML and Perl

by Mark Riehl, Ilya Sterin
October 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
9h 40m
English
Sams
Content preview from XML and Perl

Advantages of Event-Driven Parsers

Event-driven parsers have several advantages over tree-based parsers.

An event-driven parser can handle huge amounts of XML data. Let’s say that you need to parse XML data in a file that is hundreds of megabytes in size. The parser works through the file, reading each line, triggering events when they’re needed. A DOM-based parser would need to read the entire file into memory at once, something that might be difficult on smaller PCs or workstations. So, for the same XML data, a DOM-based parser requires more memory. Depending on the size of the XML data, it can be impractical (or even impossible) to use a DOM-based parser.

Another advantage of an event-driven parser is the complete XML file doesn’t need ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl and XML

Perl and XML

Erik T. Ray, Jason McIntosh
Programming Web Services with Perl

Programming Web Services with Perl

Randy J. Ray, Pavel Kulchenko
Mastering Perl

Mastering Perl

brian d foy
Perl by Example

Perl by Example

Ellie Quigley

Publisher Resources

ISBN: 0735712891Purchase book