The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

        DBIx::XML::DataLoader::MapIt

SYNOPSIS

        use DBIx::XML::DataLoader::MapIt;

        my  @classmap=DBIx::XML::DataLoader::MapIt->mapclasses('map.xml');
or
        use DBIx::XML::DataLoader::::MapIt;

        my $m=DBIx::XML::DataLoader::MapIt->new();
        my @classmap=$m->mapclasses('map.xml');
or
        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);
or
        use DBIx::XML::DataLoader::MapIt;

        my $m=MapIt->new();
       my $map="http://urltomap.com/map.xml";
        my @classmap=$m->mapclasses($map);

DESCRIPTION

        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).

Map Rules

see man page DBIx::XML::DataLoader for complete map rules and sample map file.

Also see man page for

              DBIx::XML::DataLoader and DBIx::XML::DataLoader::XMLWriter

Sample Scripts

               query_db.pl, and test_mapit.pl

1 POD Error

The following errors were encountered while parsing the POD:

Around line 280:

=pod directives shouldn't be over one line long! Ignoring all 12 lines of content