Login   Register  
PHP Classes
elePHPant
Icontem

File: XmlObjectTest.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2003-11-28 10:51
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>