Re: [PHP] new_xmldoc won't work?

2002-03-18 Thread Erik Price


On Friday, March 15, 2002, at 07:04  PM, Edward Tanguay wrote:

> $doc = new_xmldoc('1.0');
> $root = $doc->ad_root('sites');
> $site = $root->ne_child('site','');
> $site->new_child('title','PHP.net');
> $site->new_child('url','http://www.php.net');
> $site->new_child('description','The homepge of PHP');
> $site->new_child('keywords','MySQL, PHP');
>
> print $doc->dumpmem();
>
> xslt_output_endtransform();
> ?>
>
> Where can I get "new_xmldoc()"?
>

I could be wrong about this, but if you're trying to create a new 
instance of a class called "xmldoc", then shouldn't you omit the 
underscore?

Then again, I just read the man page for xmldoc() and it doesn't seem 
like that's what you're using here.  I didn't find any reference to a 
function called "new_xmldoc()", though I did see a big disclaimer that 
the DOM-using XML functions in PHP are subject to change and are 
somewhat unstable.

Erik




Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] new_xmldoc won't work?

2002-03-15 Thread Edward Tanguay

Can anyone shed light on why this code doesn't work?
I get: fatal error: Call to undefined function: new_xmldoc() in
/home/tanguay/test/testsab2.php on line 4

ad_root('sites');
$site = $root->ne_child('site','');
$site->new_child('title','PHP.net');
$site->new_child('url','http://www.php.net');
$site->new_child('description','The homepge of PHP');
$site->new_child('keywords','MySQL, PHP');

print $doc->dumpmem();

xslt_output_endtransform();
?>

Where can I get "new_xmldoc()"?

Thanks,
Edward



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php