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. Advertising

  2. Klaus

    Klaus Guest

    On 27 avr, 18:41, Klaus <> wrote:
    > 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


    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:

    > my $rdr = XML::Reader->newhd(\$content, { filter => 5 },


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. martin
    Replies:
    0
    Views:
    355
    martin
    Jul 29, 2003
  2. Thomas W
    Replies:
    3
    Views:
    459
    Stefan Behnel
    Oct 10, 2007
  3. Guilherme Grillo

    reader inside a reader

    Guilherme Grillo, Nov 7, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    526
    sloan
    Nov 7, 2007
  4. Pokkai Dokkai
    Replies:
    1
    Views:
    233
    Hassan Schroeder
    Mar 24, 2008
  5. Klaus

    module XML::Reader

    Klaus, Apr 18, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    128
    Klaus
    Apr 18, 2011
Loading...

Share This Page