[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-xml
Subject:    Re: Passing data to XML::Twig twig_roots callbacks....?
From:       "Jenda Krynicky" <Jenda () Krynicky ! cz>
Date:       2008-12-30 0:08:23
Message-ID: 49597487.9398.A22BC22 () Jenda ! Krynicky ! cz
[Download RAW message or body]

From: Dustin Suchter <dsuchter@ucla.edu>
> I'm working on implementing the suggestions here, I'll mail back
> with the results, so thanks in advance.
> 
> As a related question, you bring up XML::Rules, which I didn't
> consider until now. I specifically chose XML::Twig for a combination
> of (1) primarily it's memory management and (2) it's interface for
> grabbing just the useful parts of XML. I'm dealing with files that
> will regularly exceed the memory available to Perl, hence I need to
> be cleaver when parsing. After reading the CPAN page for XML::Rules
> I don't see anything about it being able to handle large files, in
> fact, I see some things that imply it is a bad choice when your XML
> won't fit in memory. Can you confirm/deny that? Since I don't see a
> direct answer online I figure I'll just ask someone who's obviously
> used it before...

It can handle huge files just fine, it depends on the rules you 
specify.

You can use the builtin rules to accumulate the data of a twig in the 
most convenient format and then handle the twig with a custom rule.

You may of course use custom rules on several levels, to filter the 
twig more, to store the twig data into some database and only include 
the ID in the data that stays in memory for the bigger twig.

There's quite a few examples and attempts to explain XML:Rules on 
PerlMonks.org.

Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery

_______________________________________________
Perl-XML mailing list
Perl-XML@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic