Example #1
0
 public function parseRoot(dom\element $el)
 {
     if ($el->countChildren()) {
         $this->launchException('No content allowed');
     }
     $this->setNode($el);
 }
Example #2
0
 protected function parseID(dom\element $el)
 {
     if ($el->isComplex()) {
         if ($el->countChildren() > 1) {
             $this->throwException(sprintf('Only one child expected in %s', $el->asToken()));
         }
         $mResult = $this->parseElement($el->getFirst());
     } else {
         $mResult = $el->read();
     }
     $this->setID($mResult);
 }