Mercurial > pub > Impl
view _test/any.pl @ 36:1828103371d0
DOM in works
author | Sergey |
---|---|
date | Fri, 20 Nov 2009 16:48:08 +0300 |
parents | 818c74b038ae |
children | c2e7f7c96bcd |
line wrap: on
line source
#!/usr/bin/perl -w use strict; use lib '..\Lib'; require IMPL::DOM::Navigator::SimpleBuilder; my $builder = IMPL::DOM::Navigator::SimpleBuilder->new(); use Time::HiRes qw(gettimeofday tv_interval); my $t = [gettimeofday]; $builder->NavigateCreate('personInfo', version => '1'); $builder->NavigateCreate('firstName')->nodeValue('Nemo'); $builder->Back(); $builder->NavigateCreate('lastName')->nodeValue('Nobel'); $builder->Back(); $builder->NavigateCreate('lastName')->nodeValue('Gardum'); $builder->Back(); for(1..10000) { $builder->NavigateCreate('address', local => 1); $builder->NavigateCreate('street')->nodeValue('Hellroad'); $builder->Back(); $builder->NavigateCreate('line')->nodeValue($_); $builder->Back(); $builder->Back(); } $builder->Back(); print "Build: ",tv_interval($t,[gettimeofday]),"\n";