[EMAIL PROTECTED] (Sean M. Burke) writes:

> So I've just come up with two routines that dump an Element tree as a
> big blob of binary goo, which is generally no bigger than (and often
> somewhat smaller than) the corresponding HTML source.  It's very fast
> because it doesn't work for just any structure, but works just for
> HTML::Element tree structures.  (For example, it doesn't have to deal
> with deep-dumping reference structures -- it assumes that _parent and
> _content are the only attributes that will have references as values,
> and that Element trees will be composed only of HTML::Element objects,
> and text segments.)
> 
> In practice, it's not much different than writing $tree->as_HTML to a
> file, and then reading it back in with a call to TreeBuilder's
> parse_file -- but it's much faster for writing as well as reading.

I think you should then take a look at Storable.  It should do this
better and faster than anything you can code up directly in perl.

Regards,
Gisle

Reply via email to