function childCount($ignore_text_comments = false)
{
if (!$ignore_text_comments) {
return count($this->children);
} else {
$count = 0;
//foreach($this->children as &$c) {
// if (!$c->isTextOrComment()) {
// ++$count;
// }
//}
foreach (array_keys($this->children) as $k) {
if (!$this->children[$k]->isTextOrComment()) {
++$count;
}
}
return $count;
}
}