示例#1
0
 /**
  * @inheritDoc
  */
 protected function openTag($ele)
 {
     $this->wr('<')->wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName);
     $this->attrs($ele);
     $this->namespaceAttrs($ele);
     if ($this->outputMode == static::IM_IN_HTML) {
         if (!Elements::isA($ele->localName, Elements::VOID_TAG)) {
             $this->wr('>');
         } else {
             $this->wr(' />');
         }
     } else {
         if ($ele->hasChildNodes()) {
             $this->wr('>');
         } else {
             $this->wr(' />');
         }
     }
 }