can someone pls help on PHP5 DOM/XML functions?!
* how to dump a html dom tree after creating one?
( dump_mem() doesn't work in PHP5 ?! )
thx
PHP5 DOM/XML trouble!!
Moderator: General Moderators
You must understand that PHP5 is at beta 1 right now so any issues you are experiencing could be listed on :
http://bugs.php.net/
Have you checked the bugs for PHP5 ?
To help us help you a little more, could you provide a little more detail on your error/issue, maybe post a snippet of code and the error message.
Regards,
http://bugs.php.net/
Have you checked the bugs for PHP5 ?
To help us help you a little more, could you provide a little more detail on your error/issue, maybe post a snippet of code and the error message.
Regards,
actually it's not a bug in PHP5.. the total DOM/XML usage has been changed completely.. for example to create a new DOM Object in PHP 4 here's the code..
$dom = domxml_new_doc('1.0');
but in PHP5 it should be
$dom = new DomDocument('1.0'); as I figured out by guess work..
also all the underscores in method names have been removed.
the way to print a DOM object in PHP4 was by
echo $dom->dump_mem();
but I don't know how to do it in PHP 5 since there is no documentation at all...
thx.
$dom = domxml_new_doc('1.0');
but in PHP5 it should be
$dom = new DomDocument('1.0'); as I figured out by guess work..
also all the underscores in method names have been removed.
the way to print a DOM object in PHP4 was by
echo $dom->dump_mem();
but I don't know how to do it in PHP 5 since there is no documentation at all...
thx.
DOM/XML in PHP5.. found the solution
the PHP5 beta1 source folder contains one example in php5-beta1/ext/dom/examples folder. this gives how to use DOM/XML manipulation in PHP5.
echo $dom->savexml();
can be used to dump an xml document..
echo $dom->savexml();
can be used to dump an xml document..