Esempio n. 1
0
 public function testCreateDocumentFromErrneousDocbook()
 {
     $doc = new ezcDocumentDocbook();
     $doc->options->failOnError = false;
     $doc->loadFile(dirname(__FILE__) . '/files/docbook/errorneous.xml');
     $rst = new ezcDocumentRst();
     try {
         $rst->createFromDocbook($doc);
         $this->fail('Expected ezcDocumentVisitException.');
     } catch (ezcDocumentVisitException $e) {
         /* Expected */
     }
 }
Esempio n. 2
0
<?php

require 'tutorial_autoload.php';
$docbook = new ezcDocumentDocbook();
$docbook->loadFile('docbook.xml');
$rst = new ezcDocumentRst();
$rst->createFromDocbook($docbook);
echo $rst->save();