PHP Classes

File: XmlObjectTest.php

Recommend this page to a friend!
  Classes of Augusto Cesar Castoldi   XML Object   XmlObjectTest.php   Download  
File: XmlObjectTest.php
Role: Example script
Content type: text/plain
Description: Examples of storing an object and reading the xml
Class: XML Object
Store and retrieve objects from XML documents
Author: By
Last change:
Date: 20 years ago
Size: 542 bytes
 

Contents

Class file image Download
<?

include_once("class.XmlObject.php");
include_once(
"class.Test.php");

$test = new Test("Augusto Cesar Castoldi");
$test->email = "castoldi@inf.ufsc.br";
$test->date = "2003-11-28";

$xmlObject = new XmlObject();

$xmlObject->saveObject($test, "/home/user/XmlObjectTest.xml");

$test = new Test();
$test = $xmlObject->getObject($test, "/home/user/XmlObjectTest.xml");

echo
"name=$test->name<br>
email=
$test->email<br>
date=
$test->date";

?>
<br><br>
<a href="XmlObjectTest.xml" target="_blank">open gererated xml</a>