/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-10-09 04:07:13 UTC
  • Revision ID: csa@dside.dyndns.org-20091009040713-mel06whc852tf2xz
XPath expression optimizations, various fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    $doc = $parser->parse_file ($xml);
24
24
    if ($walk) {
25
25
        my $sum = 0;
26
 
        my @nodes = $doc->findnodes("//*[(number(@*) or number(text())) and (count(../child::*)>3)]");
 
26
        my @nodes = $doc->findnodes("//*[count(child::*)>3]/*[number(@*) or number(text())]");
27
27
        foreach $node(@nodes) {
28
28
            $child = $node->getFirstChild();
29
29
            if (($child)&&($child->nodeType == TEXT_NODE)) {