public function parse_listing($xmlNode) { // If a the language attribute is specified, the syntaxhightligher brush class is used if ($xmlNode->hasAttribute('language')) { return '<pre class="brush: ' . $xmlNode->attribute('language') . '">' . $xmlNode->value() . '</pre>'; } else { return '<div class="pre">' . str_replace(array(' ', "\t"), ' ', \Xily\Base::htmlEncode(rtrim(preg_replace('/^.*\\n/', '', $xmlNode->value(), 1)))) . '</div>'; } }
/** * Set the include path for additional XML documents * * @param string $strPath * @return void */ public function setIncludePath($strPath) { $this->strIncludePath = \Xily\Base::fileFormatDir($strPath); }