PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Ben Yacoub Hatem   VXML Parser   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample use of the vxml parser class
Class: VXML Parser
A VXML Validator class application
Author: By
Last change:
Date: 21 years ago
Size: 2,674 bytes
 

Contents

Class file image Download
<?php

/*
* +------------------------------------------------------------------------------+
* Sample use of the VXML Parser class
* +------------------------------------------------------------------------------+
* © 2002 all rights reserved by Dynamix S.a.r.l.
* +------------------------------------------------------------------------------+
* OSI License :
* Free For Educational Use
* +------------------------------------------------------------------------------+
* Disclaimer Notice(s)
* The use of any code included into this website is prohibed without a written
* authorisation from the author of this project itself.
* This copyright notice cannot be removed in any case, and should be included
* in every Dynamix project or demo code.
*
* The author isn't responsible of any damage could be caused by this software.
* Use it at your own risk !
*
* +------------------------------------------------------------------------------+
* Updates
* +------------------------------------------------------------------------------+
*
* +------------------------------------------------------------------------------+
* Author(s): Ben Yacoub Hatem reflex_news@yahoo.fr
* +------------------------------------------------------------------------------+
* Generated the 27-09-2002 12:20:45 with PHP Class Builder by Hatem Ben Yacoub.
*
*/
include ("vxml.parser.php");
$vxml = new vxml_parser;
$vxml->_file = "horloge.vxml";
echo
"<h1>XML tests</h1> ";
if (
$vxml->parse()){
    echo
"<font color=green><b>This is a Valid XML document</b></font><br/>";
    echo
"Size : ".$vxml->size." Octets <br/>";
    echo
"Texts : ".$vxml->texts."<br/>";
    echo
"text size : ".$vxml->text_size."<br/>";
    echo
"Elements : ".$vxml->elements."<br/>";
    echo
"Attributes : ".$vxml->attributes."<br/>";
} else {
    echo
"Not Valid XML document";
}
echo
"<h1>VXML test 1</h1>";

$vxml->test1();
if (!
$vxml->err_test1)
{
    echo
"<font color=green><b>All tags Are valid VXML 2.0</b></font>";
}

echo
"<h1>VXML test 2</h1>";

$vxml->test2();
if (!
$vxml->err_test2)
{
    echo
"<font color=green><b>VXML tag is present in the beginning of the vxml document.</b></font>";
}

echo
"<h1>VXML test 3</h1>";

if (
$vxml->_test3())
{
    echo
"<font color=green><b>VXML test fonctionality is passed.</b></font>";
} else {
    echo
"<font color=green><b>Error occured while VXML test fonctionality.</b></font>";
}


echo
"<h1>VXML test 4</h1>";

$vxml->test4();
if (!
$vxml->err_test4)
{
    echo
"<font color=green><b>Correct VXML tags attribute in vxml document.</b></font>";
}



?>