Re: Simple XML - problem with errors
| From: | Marc Guay | Date: | Thu, 08 Jul 2010 13:11:57 +0000 |
| Subject: | Re: Simple XML - problem with errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306760@lists.php.net to get a copy of this message | ||
> libxml_use_internal_errors(true);
> $this->xml = new SimpleXMLElement($this->htmlString);
Hi Gary,
I have code that looks like this:
libxml_use_internal_errors(true);
$xml = simplexml_load_string($val);
$errors = libxml_get_errors();
if ($errors)
do this
else
do that
which works fine. Not sure if that's helpful to you, but it seems
like it might.
Marc