Perl Module XML::Reader

Discussion in 'XML' started by Klaus, Apr 27, 2010.

  1. Klaus

    Klaus Guest

    Hi everybody,

    For those who use Perl to parse XML...

    ....I have released XML::Reader (ver 0.34)

    An XML document can be very large (could be many gigabytes), it is
    usually composed of XML-subtrees, each of which is possibly only a few
    kilobytes in size. With the Perl module XML::Reader, you can read XML-
    subtrees one by one, only the memory for one subtree is held at a
    time. Each subtree can then be processed further at your convenience
    (for example by using Perl's regular expressions, or, by using other
    XML-Modules in Perl, such as XML::Simple).

    In principle, XML::Reader has no event driven callback functions, you
    have to loop over the XML-document yourself and the resulting XML-
    subtree is represented in text format.

    Any question, suggestions, feedback are most welcome !

    To explain the module, I have created a small demonstration program in
    Perl that extracts XML-subtrees memory efficiently.

    You can find my demonstration program at
    Klaus, Apr 27, 2010
    1. Advertisements

  2. Klaus

    Klaus Guest

    I have now released a new version of XML::Reader (ver 0.35) with some
    bug fixes, warts removed, relicensing, etc...

    For XML::Reader ver 0.34) you could write:
    With the new version 0.35 of XML::Reader, the same line would be

    my $rdr = XML::Reader->new(\*DATA, {mode => 'branches'});
    Klaus, Apr 30, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.