Location: PHPKode > scripts > XML Class > xml-class/test_xml_class.php
<?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>";
?>
Return current item: XML Class