public function collect(SimpleXMLElement $element)
    {
        if ($element->getName() === get_called_class()::getTagName() && $this->locateDataObject($element)) {
            $this->getAttributes($element);
            $this->getChilds($element);
        } else {
            throw new ENabuXMLException(ENabuXMLException::ERROR_UNEXPECTED_ELEMENT, array($element->getName()));
        }
    }
public function collect(SimpleXMLElement $element)
    {
        if ($element->getName() === get_called_class()::getTagName() && $this->locateDataObject($element)) {
            $this->getAttributes($element);
            $this->getChilds($element);
        } else {
            throw new ENabuXMLException(ENabuXMLException::ERROR_UNEXPECTED_ELEMENT, array($element->getName()));
        }
    }
public function collect ( SimpleXMLElement $ element ) { if ( $ element -> getName ( ) === get_called_class ( ) :: getTagName ( ) && $ this -> locateDataObject ( $ element ) ) { $ this -> getAttributes ( $ element ) ; $ this -> getChilds ( $ element ) ; } else { throw new ENabuXMLException ( ENabuXMLException :: ERROR_UNEXPECTED_ELEMENT , array ( $ element -> getName ( ) ) ) ; } }
Collects data from a XML branch.
@param SimpleXMLElement $element Element of XML containing data to be collected.
@throws ENabuXMLException Raises an exception if any error is detected collecting the content.
Collects data from a XML branch .