protected function childbearing(\DOMNode $node)
    {
        if ($node->hasChildNodes())
        {
            foreach ($node->childNodes as $child)
            {
                if ($child->nodeType === XML_ELEMENT_NODE)
                {
                    return true;
                }
            }
        }

        return false;
    }
protected function childbearing(\DOMNode $node)
    {
        if ($node->hasChildNodes())
        {
            foreach ($node->childNodes as $child)
            {
                if ($child->nodeType === XML_ELEMENT_NODE)
                {
                    return true;
                }
            }
        }

        return false;
    }
protected function childbearing ( \ DOMNode $ node ) { if ( $ node -> hasChildNodes ( ) ) { foreach ( $ node -> childNodes as $ child ) { if ( $ child -> nodeType === XML_ELEMENT_NODE ) { return true ; } } } return false ; }
Checks if a specified node has children.

@param  \DOMNode $node
@return boolean
Checks if a specified node has children .