/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-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:
6
6
    if ($walk_tree) {
7
7
        $sum = 0;
8
8
        $xp = new DOMXPath($doc);
9
 
        $nodes = $xp->query("//*[(number(@*) or number(text())) and (count(../child::*)>3)]");
 
9
        $nodes = $xp->query("//*[count(child::*)>3]/*[number(@*) or number(text())]");
10
10
        foreach ($nodes as $node) {
11
11
            $child = $node->firstChild;
12
12
            if (($child)&&($child instanceof DOMText)) {