/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk

« back to all changes in this revision

Viewing changes to parse/scripts/libxml.pl

  • Committer: Suren A. Chilingaryan
  • Date: 2009-09-28 21:25:28 UTC
  • Revision ID: csa@dside.dyndns.org-20090928212528-e6oby5he4yrueskz
Parsing tests for mono, vtd-xml, lisp, scripting languages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use XML::LibXML;
 
4
$parser = new XML::LibXML;
 
5
 
 
6
sub parse {
 
7
    ($xml) = @_;
 
8
    $doc = $parser->parse_file ($xml);
 
9
    undef($doc);
 
10
}
 
11
 
 
12
sub filename {
 
13
    ($i) = @_;
 
14
    if (@ARGV > 1) { return $ARGV[1]; }
 
15
    else { return "../xml.tmp/$i.xml"; }
 
16
}
 
17
 
 
18
if (@ARGV > 0) {
 
19
    $iterations = $ARGV[0];
 
20
} else {
 
21
    $iterations = 0;
 
22
}
 
23
 
 
24
parse(filename(0));
 
25
for ($i=1;$i<=$iterations;$i++) {
 
26
    parse(filename($i));
 
27
}