Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Perl Module XML::Reader

Reply
Thread Tools

Perl Module XML::Reader

 
 
Klaus
Guest
Posts: n/a
 
      04-27-2010
Hi everybody,

For those who use Perl to parse XML...

....I have released XML::Reader (ver 0.34)
http://search.cpan.org/~keichner/XML.../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....e63781c60d525e
 
Reply With Quote
 
 
 
 
Klaus
Guest
Posts: n/a
 
      04-30-2010
On 27 avr, 18:41, Klaus <klau...@gmail.com> 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.../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.../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'});
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i convert my perl script to be a perl module? georg.heiss@gmx.de Perl Misc 4 02-10-2009 06:21 PM
Re: module docstring, documentation,anything? please note is the module type/object NOT some module Maric Michaud Python 0 06-24-2006 12:42 PM
how to use Perl module - Perl Magick??? i am a newbie. jadkit@gmail.com Perl Misc 2 02-06-2006 05:59 PM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
Converting a perl module to a python module would it be worth it? Mothra Python 5 04-15-2005 06:09 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57