in reply to Native XML Repository + Perl

I just did this sort of thing. I used File::Slurp to read the directories of XML files and XML::Twig to parse the XML files and create delimited ascii tables. The delimited ascii tables are read into the database using a very short SQL program.

I made a mod_perl web application to query the database using CGI::Application, HTML::Template, and DBI. The resulting code is simple, brief, and separates program logic from the HTML. The big win with this separation is that the perl code becomes so much shorter that it is much easier to read. The HTML is also easier to read, since it isn't spread across the perl source code.

The way that I used XML::Twig is similar to the way that XML::Filter::Dispatcher works. Since XML::Filter uses SAX, and SAX is a standards-based approach, the javaheads may like it better. I compared the two approaches and found them to have similar speed in a different application. XML::Twig, however, has the advantage that it easy to tune the code to provide a speed/memory tradeoff.

It should work perfectly the first time! - toma

Replies are listed 'Best First'.
Re: Re: Native XML Repository + Perl
by mirod (Canon) on Mar 28, 2003 at 07:32 UTC

    You can also read my comments on the comparizon. The highlight is that I managed to get the code to run twice as fast (Barry could probably do the same with XML::Filter::Dispatcher too though ;--)