use DBIx::XML_RDB; my $xmlout = DBIx::XML_RDB->new($datasource, "ODBC", $userid, $password, $dbname) or die "Failed to make new xmlout"; # tell DBIx::XML_RDB which data it should retrieve # (by using a SELECT statement) $xmlout->DoSql("select id, name from foo"); # write out the data in XML format print $xmlout->GetData;