Re: Passing data to XML::Twig twig_roots callbacks....?

"Jenda Krynicky" <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
From: Dustin Suchter <[email protected]>
> 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
===== [email protected] === 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
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.