|
Item Description: Exports data from a relational data base as XML
Review Synopsis:
Description
DBIx::XML_RDB - Perl extension for creating XML from existing DBI
datasources. DBIx::XML_RDB comes with the sql2xml tool which
simply dumps a table in a database to an XML file.
Why use DBIx::XML_RDB?
- you want to export the data base data in XML
- you prefer to process the data using XML tools rather than as a table
Why NOT use DBIx::XML_RDB?
- you are not using a DBI-supported data base!
- you want to generate something more complex than
just record oriented XML, with nested structures
for sub-tables for example
Example
use DBIx-XML_RDB;
my $xmlout = DBIx::XML_RDB->new($datasource,
"ODBC", $userid, $password, $dbname) || die "Failed to make new xmlout";
$xmlout->DoSql("select * from MyTable");
print $xmlout->GetData;
Personal Notes
I haven't used DBIx-XML_RDB too often (the first script
I wrote with DBI did exactly the same thing!) but it
looks like the right tool to generate XML out of a
relational table
RE: DBIx::XML_RDB by Anonymous Monk on Sep 01, 2000 at 21:07 UTC |
There seems to be a bug in MySQL which prevents it from working
to read XML into the database. But it works fine to extract it.
It also needs some maintainence, but I'm missing tuits.
Matt. | [reply] |
|
Matt, thanks for the heads up. I don't know if anyone else has noticed this problem or not. Have you checked MSQL's docs for discussions of this problem? Can you point me to a location that discusses that problem? Was there something Perl specific you wanted to ask, or does this relate to a Perl module you are working on? Generally we like to keep things related to Perl when we post, or else, there will be too much noise in our sig2noise ratio. ;) Cheers!
| [reply] |
|
| [reply] |
|
|
Thanks for the info and to everyone else who wrote in.
r.b.
| [reply] |
|
Just an FYI, the MySQL issue has been worked around in the latest release of DBIx::XML_RDB (though the bug in MySQL may still exist). Also, this module now produces well-formed XML and properly encodes any > and < characters that may be in the SQL query when writing the output file.
-ubu
| [reply] |
Re: DBIx::XML_RDB by DamnDirtyApe (Curate) on Aug 08, 2001 at 22:17 UTC |
I can't seem to get DBIx::XML_RDB to connect to an Oracle database... anyone else have this problem? DBI connects fine. | [reply] |
|
| [reply] |
|
| [reply] |
Back to Reviews
|