PHP Classes

File: test_xml_class.php

Recommend this page to a friend!
  Classes of Mustafa Berkan BICER   XML Class   test_xml_class.php   Download  
File: test_xml_class.php
Role: Example script
Content type: text/plain
Description: Test XML Class
Class: XML Class
Parse XML documents and retrieved named elements
Author: By
Last change:
Date: 16 years ago
Size: 1,428 bytes
 

Contents

Class file image Download
<?php
   
include("xml.class.php");
   
   
$cls_xml=new readXML(); // Create XML Class
   
$rcs_xml=$cls_xml->openXML("licence.lic.xml","test_app"); // Get XML Recordset
   
$test_name=$cls_xml->getFieldValue($rcs_xml,"name","0"); // Get Field Value
   
$test_vers=$cls_xml->getFieldValue($rcs_xml,"ver","0"); // Get Field Value
   
$test_anme=$cls_xml->getFieldValue($rcs_xml,"author_name","0"); // Get Field Value
   
$test_amil=$cls_xml->getFieldValue($rcs_xml,"author_mail","0"); // Get Field Value
   
$test_asit=$cls_xml->getFieldValue($rcs_xml,"author_site","0"); // Get Field Value
   
   
echo "Name : ".$test_name.", Ver : ".$test_vers."<br />";
    echo
"Author : <a href=\"mailto:$test_amil\">".$test_anme."</a><br />";
    echo
"Author WebSite : <a href=\"http://$test_asit\">".$test_asit."</a>";
   
   
$test_name=$cls_xml->getFieldValue($rcs_xml,"name","1"); // Get Field Value
   
$test_vers=$cls_xml->getFieldValue($rcs_xml,"ver","1"); // Get Field Value
   
$test_anme=$cls_xml->getFieldValue($rcs_xml,"author_name","1"); // Get Field Value
   
$test_amil=$cls_xml->getFieldValue($rcs_xml,"author_mail","1"); // Get Field Value
   
$test_asit=$cls_xml->getFieldValue($rcs_xml,"author_site","1"); // Get Field Value
   
   
echo "<br /><br />Name : ".$test_name.", Ver : ".$test_vers."<br />";
    echo
"Author : <a href=\"mailto:$test_amil\">".$test_anme."</a><br />";
    echo
"Author WebSite : <a href=\"http://$test_asit\">".$test_asit."</a>";
?>