Re: Simple XML - problem with errors
| From: | Gary . | Date: | Thu, 08 Jul 2010 14:43:34 +0000 |
| Subject: | Re: Simple XML - problem with errors | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306761@lists.php.net to get a copy of this message | ||
Marc Guay writes:
>> libxml_use_internal_errors(true);
>> $this->xml = new SimpleXMLElement($this->htmlString);
> I have code that looks like this:
>
> libxml_use_internal_errors(true);
> $xml = simplexml_load_string($val);
Yeah. I tried simplexml_load_string and found that "worked" (in that it
didn't cause an exception - there are errors which caused the conversion
not to work). I wonder what the difference is between doing "new
SimpleXMLElement" and calling simplexml_load_string which results in the
libxml_use_internal_errors call being ineffective. Odd.