length); foreach ($nodeList as $node) { echo "\t{$node->nodeName} {$node->textContent}\n"; } echo "---\n"; }