PHP Classes
elePHPant
Icontem

File: testing.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Slawomir Jasinski  >  Beauty XML  >  testing.php  >  Download  
File: testing.php
Role: Example script
Content type: text/plain
Description: Example script to test class
Class: Beauty XML
Reformat XML documents with same indentation rules
Author: By
Last change:
Date: 10 years ago
Size: 456 bytes
 

Contents

Class file image Download
<?php
    
    
   
require_once('beauty_xml.php');
    
   
$bx = new beauty_xml();
    
   
// loading file into o string
   
$xmlString = join("", file('testing.xml'));
    
    echo
"<h3>Original string</h3>";
    echo
"<pre>";
    echo
htmlspecialchars($xmlString);
    echo
"</pre>";
    
    echo
"<h3>Beautified string</h3>";
    echo
"<pre>";
    echo
htmlspecialchars($bx->format_xml($xmlString));
    echo
"</pre>";
?>