DBIx::XML::DataLoader::MapIt
use DBIx::XML::DataLoader::MapIt; my @classmap=DBIx::XML::DataLoader::MapIt->mapclasses('map.xml');
use DBIx::XML::DataLoader::::MapIt; my $m=DBIx::XML::DataLoader::MapIt->new(); my @classmap=$m->mapclasses('map.xml');
use DBIx::XML::DataLoader::MapIt; my $m=DBIx::XML::DataLoader::MapIt->new(); my $map=qq{ <XMLtoDB> <RootElement name="/Users"/> <dbinfo dbuser="user" dbpass="pass" dbsource="dbi:mysql:userdata" name="userdata"/> <Table name="userinfo" dbname="userdata" xpath="./user"> <KeyColumn name="USER_ID" order="1"/> <KeyColumn name="USER_LAST_NAME" order="2"/> <KeyColumn name="USER_FIRST_NAME" order="3"/> <Element xpath="./id" toColumn="USER_ID"/> <Element xpath="./last_name" toColumn="USER_LAST_NAME"/> <Element xpath="./first_name" toColumn="USER_FIRST_NAME"/> <Element xpath="./phone_number" toColumn="PHONE_NUMBER"/> </Table> </XMLtoDB>}; my @classmap=$m->mapclasses($map);
use DBIx::XML::DataLoader::MapIt; my $m=MapIt->new();
my @classmap=$m->mapclasses($map);
MapIt.pm is used primarily by DataLoader.pm for extracting mapping information from a xml map file. The mapping information can be used for querying a database for the purpose of reconstructing a xml document(see the sample script query_sql.cb).
1 POD Error
The following errors were encountered while parsing the POD:
=pod directives shouldn't be over one line long! Ignoring all 12 lines of content
To install DBIx::XML::DataLoader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::XML::DataLoader
CPAN shell
perl -MCPAN -e shell install DBIx::XML::DataLoader
For more information on module installation, please visit the detailed CPAN module installation guide.