view _test/temp.pl @ 218:358f867712b4

sync
author sergey
date Mon, 20 Aug 2012 17:24:48 +0400
parents 77a9934a44af
children c477f24f1980
line wrap: on
line source

#!/usr/bin/perl
use strict;

use XML::Compile::Schema;
use XML::Compile::Util qw(pack_type);
use Data::Dumper;
use Time::HiRes qw(gettimeofday tv_interval);
    
my $schema = XML::Compile::Schema->new('Resources/person.xsd');

$schema->printIndex();

my $type = pack_type 'http://implab.org/person/', 'personInfo';
my $reader = $schema->compile(READER => $type);

my $t = [gettimeofday];

my $obj = $reader->('Resources/person_info.xml');

print "Parsing small Xml file: ",tv_interval($t,[gettimeofday]),"\n";

print Dumper( $obj );