note 95464 added to domdocument.loadhtmlfile

From: Date: Mon, 04 Jan 2010 16:42:49 +0000
Subject: note 95464 added to domdocument.loadhtmlfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-164625@lists.php.net to get a copy of this message
DOMDocument is very good at dealing with imperfect markup, but it throws warnings all over the place when it does. This isn't well documented here. The solution to this is to implement a separate aparatus for dealing with just these errors. Set libxml_use_internal_errors(true) before calling loadHTML. This will prevent errors from bubbling up to your default error handler. And you can then get at them (if you desire) using other libxml error functions. You can find more info here http://www.php.net/manual/en/ref.libxml.php ---- Server IP: 69.147.83.197 Probable Submitter: 96.254.8.12 ---- Manual Page -- http://www.php.net/manual/en/domdocument.loadhtmlfile.php Edit -- https://master.php.net/note/edit/95464 Del: integrated -- https://master.php.net/note/delete/95464/integrated Del: useless -- https://master.php.net/note/delete/95464/useless Del: bad code -- https://master.php.net/note/delete/95464/bad+code Del: spam -- https://master.php.net/note/delete/95464/spam Del: non-english -- https://master.php.net/note/delete/95464/non-english Del: in docs -- https://master.php.net/note/delete/95464/in+docs Del: other reasons-- https://master.php.net/note/delete/95464 Reject -- https://master.php.net/note/reject/95464 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164625) next »