php-general | 2001092
Date: 09/30/01
- Next message: Chris Herring: "[PHP] Subroutines"
- Previous message: John Lim: "[PHP] oci8.max_links missing from php.ini"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This week I've been looking for functions to work with
XML.
If you want to create XML files, always use DOMXML
functions (php compile --with-dom).
Here is some code:
<?
$doc = new_xmldoc ('1.0');
$root = $doc->add_root('sites');
$site = $root->new_child('site', '');
$site->new_child('title', 'PHP.net');
$site->new_child('url', 'http://www.php.net');
$site = $root->new_child('site', '');
$site->new_child('title', 'Test');
$site->new_child('url',
'http://localhost/teste.php');
$fp = <email protected>('tst.xml', 'w');
if (!$fp)
die('Error open tst.xml');
fwrite($fp, $doc->dumpmem());
fclose($fp);
echo $doc->dumpmem();
?>
_______________________________________________________________________________________________
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis!
http://br.geocities.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Herring: "[PHP] Subroutines"
- Previous message: John Lim: "[PHP] oci8.max_links missing from php.ini"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

