Exemple #1
0
 /**
  * Get XML preprocessor tree from the preprocessor (which may not be the
  * native XML-based one).
  *
  * @param string $wikiText
  * @return string
  */
 protected function preprocessToXml($wikiText)
 {
     if (method_exists($this->mPreprocessor, 'preprocessToXml')) {
         return $this->normalizeXml($this->mPreprocessor->preprocessToXml($wikiText));
     }
     $dom = $this->mPreprocessor->preprocessToObj($wikiText);
     if (is_callable(array($dom, 'saveXML'))) {
         return $dom->saveXML();
     } else {
         return $this->normalizeXml($dom->__toString());
     }
 }