in reply to Re: Perl has plenty of XML parsers, but is there an XML printer?
in thread Perl has plenty of XML parsers, but is there an XML printer?

This isn't going to be used in a web environment, so I don't think that there will be a need for a solution like a XSLT stylesheet.

All that's going to be done is data retrieval and comparison via flat files (don't have access to a DB).

  • Comment on Re^2: Perl has plenty of XML parsers, but is there an XML printer?

Replies are listed 'Best First'.
Re^3: Perl has plenty of XML parsers, but is there an XML printer?
by jZed (Prior) on Jul 19, 2007 at 23:40 UTC
    Getting access to a db like SQLite or MySQL or PostgreSQL isn't that hard. But if you really want to compare flat files and XML files in a database-like manner without a database, then DBD::AnyData sounds like what you want. It handles many kinds of flat files (CSV, Fixed-width, ini, etc.) and uses XML::Twig to both read and write XML files using the standard DBI interface.

      I completely forgot about SQLite, and it's in my work's Perl dist!

      Nevermind XML, I'm going to use that :)..

        perl -MDBD::SQLite -e "print $DBD::SQLite::VERSION" will tell you if it's installed (note: DBD::, not DBI::). It's also dead simple to install if not there. You might want to check into DBD::AnyData regardless, since it makes it easy to get XML into and out of SQLite.
Re^3: Perl has plenty of XML parsers, but is there an XML printer?
by GrandFather (Saint) on Jul 19, 2007 at 23:31 UTC

    For a quick and easy database take a look at DBD::SQLite and DBI - that's the whole ball o' wax.


    DWIM is Perl's answer to Gödel