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)
    http://search.cpan.org/~keichner/XML-Reader-0.34/lib/XML/Reader.pm

    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
    http://groups.google.com/group/comp.lang.perl.modules/msg/2de63781c60d525e
     
    Klaus, Apr 27, 2010
    #1
    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...

    http://search.cpan.org/~keichner/XML-Reader-0.35/lib/XML/Reader.pm

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

    my $rdr = XML::Reader->new(\*DATA, {mode => 'branches'});
     
    Klaus, Apr 30, 2010
    #2
    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.