Re: Simple XML - problem with errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux