Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of marian  >  XHTML Validator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: simple example
Class: XHTML Validator
Validate XHTML and other types of XML documents
Author: By
Last change:
Date: 2005-07-12 00:22
Size: 2,170 bytes
 

Contents

Class file image Download
<?
include ('validator.class.php');
$txt '<h1 class="center">Title</h1>
<p class="center">Summary</p>
<h4 class="center">I</h4>
<table><tr><th>year</th><th>some data</th><th>some data</th><th>some data</th><th>some data</th></tr>
<tr><th>1953</th><td>390</td><td>74</td><td>2</td><td>1</td></tr>
<tr><th>1954</th><td>483</td><td>98</td><td>5</td><td>1</td></tr>
<tr><th>1955</th><td>330</td><td>56</td><td>4</td><td>1</td></tr>
<tr><th>1956</th><td>456</td><td>114</td><td>1</td><td>-</td></tr>
<tr><th>1957</th><td>400</td><td>87</td><td>6</td><td>1</td></tr>
<tr><th>1958</th><td>388</td><td>101</td><td>18</td><td>-</td></tr>
<tr><th>1959</th><td>406</td><td>73</td><td>-</td><td>-</td></tr>
<tr><th>1960</th><td>366</td><td>132</td><td>7</td><td>1</td></tr>
<tr><th>1961</th><td>412</td><td>137</td><td>7</td><td>1</td></tr>
<tr><th>1962</th><td>462</td><td>177</td><td>4</td><td>-</td></tr>
<tr><th>summary</th><th>4.093</th><th>1.049</th><th>54</th><th>6</th></tr>
</table>
<img src="pic/some_picture.jpg" width="100" height="100" alt="not closed">
<h4 class="center">II</h4>
<table><tr><th>year</th><th>some data</th><th>some data</th><th>some data</th><th>some data</th></tr>
<tr><th>1963</th><td>627</td><td>194</td><td>8</td><td>1</td></tr>
<tr><th>1964</th><td>585</td><td>141</td><td>14</td><td>-</td></tr>
<tr><th>1965</th><td>681</td><td>199</td><td>17</td><td>3</td></tr>
<tr><th>1966</th><td>490</td><td>170</td><td>12</td><td>1</td></tr>
<tr><th>1967</th><td>604</td><td>180</td><td>6</td><td>-</td></tr>
<tr><th>1968</th><td>675</td><td>212</td><td>6</td><td>20</td></tr>
<tr><th>1969</th><td>723</td><td>183</td><td>1</td><td>1</td></tr>
<tr><th>1970</th><td>758</td><td>232</td><td>9</td><td>3</td></tr>
<tr><th>1971</th><td>969</td><td>243</td><td>9</td><td>-</td></tr>
<tr><th>1972</th><td>795</td><td>154</td><td>13</td><td>1</td></tr>
<tr><th>summary</th><th>6.907</th><th>1.908</th><th>95</th><th>30</th></tr>
</table>'
;

    
$v = new validator($txt);
    try {
        
$v->load();
        echo 
$v->show_tree();
    } catch (
valid_except $e) {
        
$s = new valid_show($txt,$e);
//        $s = new valid_show($txt,$e,true);
        
echo $s->show();
//        echo $s->show(200);
    
}

?>