Listing C
<?php

// include class file
include ("XML/Statistics.php");

// create object
$xs = new XML_Statistics();

// define XML string
$xml = "<?xml version='1.0'?><site><url>http://www.builder.com</url><description>A
resource for Web developers</description></site>";

// analyze string
$xs->analyzeString($xml);

// count number of CDATA blocks
echo "String contains " . $xs->countDataChunks() . " CDATA blocks";

?>