public function theXmlElementShouldHaveNChildElements($element, $count)
{
$elements = $this->theXmlElementShouldExist($element);
$length = 0;
foreach ($elements->item(0)->childNodes as $node) {
if ($node->hasAttributes() || trim($node->nodeValue) != '') {
++$length;
}
}
$this->assertEquals($count, $length);
}