コード例 #1
0
 /**
  *
  * @param DOMDocument $document
  * @return DOMElement
  */
 public function GetXhtmlMetaHttpEquiv(DOMDocument $document)
 {
     return XhtmlTransitional::CreeMeta($document, $this->valeur, null, $this->champ);
 }
コード例 #2
0
 /**
  *
  * @param string $xhtml <p>
  * Le corp de la page au format XHTML Transitional valide
  * </p>
  * @todo Faire une version avec validation et sans convertion
  * @todo Faire une version avec DomDocument::loadHtml
  * @link http://stackoverflow.com/q/4081090/492638
  * @return mixed true si l'opération s'est correctement exectué, une exception
  * dans le cas contraire.
  */
 public function ImporteXhtmlDansBody($xhtml)
 {
     try {
         $fragment = $this->document->createDocumentFragment();
         $fragment->appendXml(XhtmlTransitional::ConvertieEntiteVersUnicode($xhtml));
         $this->elementBody->appendChild($fragment);
         return true;
     } catch (Exception $ex) {
         return $ex;
     }
 }