File cleaning
This commit is contained in:
parent
c3cb74283d
commit
4a3731a3e0
27 changed files with 12 additions and 443 deletions
12
doc/Documentation.txt
Normal file
12
doc/Documentation.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
DOCUMENTATION
|
||||
=================
|
||||
|
||||
|
||||
La documentation se trouve sur le site de Noalyss
|
||||
|
||||
WIKI : https://wiki.noalyss.eu/doku.php
|
||||
|
||||
MANUEL : https://manuel-fr.noalyss.eu/
|
||||
|
||||
Résumé des liens : https://www.noalyss.eu/?page_id=1031
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
|
||||
// Simon Willison, 16th April 2003
|
||||
// Based on Lars Marius Garshol's Python XMLWriter class
|
||||
// See http://www.xml.com/pub/a/2003/04/09/py-xml.html
|
||||
|
||||
class XmlWriter {
|
||||
var $xml;
|
||||
var $indent;
|
||||
var $stack = array();
|
||||
function XmlWriter($indent = ' ') {
|
||||
$this->indent = $indent;
|
||||
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."\n";
|
||||
}
|
||||
function _indent() {
|
||||
for ($i = 0, $j = count($this->stack); $i < $j; $i++) {
|
||||
$this->xml .= $this->indent;
|
||||
}
|
||||
}
|
||||
function push($element, $attributes = array()) {
|
||||
$this->_indent();
|
||||
$this->xml .= '<'.$element;
|
||||
foreach ($attributes as $key => $value) {
|
||||
$this->xml .= ' '.$key.'="'.htmlentities($value).'"';
|
||||
}
|
||||
$this->xml .= ">\n";
|
||||
$this->stack[] = $element;
|
||||
}
|
||||
function element($element, $content, $attributes = array()) {
|
||||
$this->_indent();
|
||||
$this->xml .= '<'.$element;
|
||||
foreach ($attributes as $key => $value) {
|
||||
$this->xml .= ' '.$key.'="'.htmlentities($value).'"';
|
||||
}
|
||||
$this->xml .= '>'.htmlentities($content).'</'.$element.'>'."\n";
|
||||
}
|
||||
function emptyelement($element, $attributes = array()) {
|
||||
$this->_indent();
|
||||
$this->xml .= '<'.$element;
|
||||
foreach ($attributes as $key => $value) {
|
||||
$this->xml .= ' '.$key.'="'.htmlentities($value).'"';
|
||||
}
|
||||
$this->xml .= " />\n";
|
||||
}
|
||||
function pop() {
|
||||
$element = array_pop($this->stack);
|
||||
$this->_indent();
|
||||
$this->xml .= "</$element>\n";
|
||||
}
|
||||
function getXml() {
|
||||
return $this->xml;
|
||||
}
|
||||
}
|
||||
|
||||
/* Test
|
||||
|
||||
$xml = new XmlWriter();
|
||||
$array = array(
|
||||
array('monkey', 'banana', 'Jim'),
|
||||
array('hamster', 'apples', 'Kola'),
|
||||
array('turtle', 'beans', 'Berty'),
|
||||
);
|
||||
|
||||
$xml->push('zoo');
|
||||
foreach ($array as $animal) {
|
||||
$xml->push('animal', array('species' => $animal[0]));
|
||||
$xml->element('name', $animal[2]);
|
||||
$xml->element('food', $animal[1]);
|
||||
$xml->pop();
|
||||
}
|
||||
$xml->pop();
|
||||
|
||||
print $xml->getXml();
|
||||
|
||||
*/
|
||||
?>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue