Ejemplo n.º 1
0
 function set_docXSL($docXSL)
 {
     $docXSL = so_dom::create($docXSL);
     if (file_exists($this->pathXSL)) {
         unlink($this->pathXSL);
     }
     file_put_contents($this->pathXSL, $docXSL);
     return null;
 }
Ejemplo n.º 2
0
<?php

header('content-type: text/plain', true);
require_once '../../../so/autoload/so_autoload.php';
$dom = so_dom::create();
$dom['?xml-stylesheet'] = array('href' => 'my.xsl', 'type' => 'text/xsl');
$dom['html'] = '';
$dom->root[] = array('@id' => 'id of root', 'head' => so_dom::create('<title>example</title>'));
// $dom[' html / body / #text ']= '</html>'; // TODO
$dom['#comment'] = $dom->root;
echo "{$dom}\n";
foreach ($dom as $key => $child) {
    echo "{$key} | {$child->value}\n";
}
$dom->DOMNode;
// cast to DOMNode