/** * Check is there child element nodes for node. * * @static * @access private * * @param DOMElement $node Node to check. * @return bool is $node contains child element nodes. */ private static function has_child($node) { if ($node->has_childNodes()) { foreach ($node->childNodes as $c) { if ($c->nodeType == XML_ELEMENT_NODE) { return true; } } } return false; }