]> andersk Git - sql-web.git/blob - lib/joe/xml.lib.php
some XHTML/XML wrapper classes
[sql-web.git] / lib / joe / xml.lib.php
1 <?php
2 require_once 'container.lib.php';
3
4 class HTML extends Container {}
5 class XHTML extends Container {}
6 class XML extends Container {
7         function __toString() {
8                 return "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n".parent::__toString();
9         }
10 }
11 class CDATA extends Container {
12         protected function paint_contents() {
13                 $r1 = "\n<![CDATA[";
14                 $r2 = "]]>\n";
15                 return $r1.parent::paint_contents().$r2;
16         }
17         function __toString() {
18                 return $this->paint_head().$this->paint_contents().$this->paint_foot();
19         }
20 }
This page took 0.029151 seconds and 5 git commands to generate.