/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.php

  • 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/php
 
2
<?
 
3
function parse($xml) {
 
4
    $doc = new DOMDocument();
 
5
    $doc->load($xml);
 
6
    //echo $doc->saveXML();
 
7
    unset($doc);
 
8
}
 
9
 
 
10
$argv = $_SERVER['argv'];
 
11
 
 
12
if (sizeof($argv) > 1)
 
13
    $iterations = $argv[1];
 
14
else
 
15
    $iterations = 0;
 
16
 
 
17
if (sizeof($argv) > 2)
 
18
    $filename = create_function('$i', 'return "' . $argv[2] . '";');
 
19
else
 
20
    $filename = create_function('$i', 'return "../xml.tmp/{$i}.xml";');
 
21
 
 
22
parse($filename(0));
 
23
 
 
24
for ($i=1;$i<=$iterations;$i++) {
 
25
    parse($filename($i));
 
26
}
 
27
?>
 
 
b'\\ No newline at end of file'