Re: xmldoc

From: Date: Fri, 23 Jun 2006 20:37:59 +0000
Subject: Re: xmldoc
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-238565@lists.php.net to get a copy of this message
On Fri, 23 Jun 2006 16:12:56 -0300, Mariano Guadagnini wrote: xmldoc, which is found in the extension DOM XML is no longer part of PHP as of PHP >= 5.0. It has been replaced by DOM. See http://dk2.php.net/manual/en/ref.dom.php http://dk2.php.net/manual/en/ref.domxml.php > Maybe when parsing the xml, the function throws an exception. That > happened to me with PHP 5 xml builtin support, which uses libxml to > process xml's, it can be that your document is malformed, you could try > with a php debugger (like zend debugger). There is really no need for debugger. Simple use the build-in exception handler. The most sane advise would be this: <?php $xmlfile = '/test/test.xml'; echo "starting parsing xml"; try { $doc = DOMDocument::load($xmlfile); } catch (Exception $ex) { echo $ex->getMessage(); } echo "done parsing xml"; ?> -- Hilsen/Regards Michael Rasmussen http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917

« previous php.general (#238565) next »