Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot


by mirod (Canon)
on Sep 01, 2000 at 16:20 UTC ( [id://30705]=modulereview: print w/replies, xml ) Need Help??

Item Description: Exports data from a relational data base as XML

Review Synopsis:


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


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

Replies are listed 'Best First'.
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, 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. ;)

        Matt is actually the author of the module, so I guess he was not really asking a question...

      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.

      Thanks for the info and to everyone else who wrote in. r.b.
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.

      Nice timing: DBIx::XML_RDB has just been replaced by XML::Generator::DBI, so you might want to give it a try in case this one works.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: modulereview [id://30705]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-21 20:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found