Why am I still getting an exception when I do this:
libxml_use_internal_errors(true);
$this-xml = new SimpleXMLElement($this-htmlString);
or this
$this-xml = new SimpleXMLElement($this-htmlString,
LIBXML_NOERROR|LIBXML_NOWARNING);
?
The exception says Exception: String could not be parsed as
On 8 July 2010 08:07, Gary . php-gene...@garydjones.name wrote:
Why am I still getting an exception when I do this:
libxml_use_internal_errors(true);
$this-xml = new SimpleXMLElement($this-htmlString);
or this
$this-xml = new SimpleXMLElement($this-htmlString,
Richard Quadling writes:
On 8 July 2010 08:07, Gary wrote:
Why am I still getting an exception when I do this:
libxml_use_internal_errors(true);
$this-xml = new SimpleXMLElement($this-htmlString);
or this
$this-xml = new SimpleXMLElement($this-htmlString,
LIBXML_NOERROR|LIBXML_NOWARNING);
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
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
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.
The documentation for Dealing with XML errors only mentions
simplexml_load_string() and this comment
And yes, I'd rather use DOM, but I can't.
Could you use this: http://simplehtmldom.sourceforge.net/?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 7/8/10, Marc Guay wrote:
And yes, I'd rather use DOM, but I can't.
Could you use this: http://simplehtmldom.sourceforge.net/?
Interesting.
Although I can't use DOM or Tidy (because they're normally built in,
but TPTB decided to recompile PHP and exclude them, and I am not
allowed to
On 8 July 2010 18:55, Gary . php-gene...@garydjones.name wrote:
On 7/8/10, Marc Guay wrote:
And yes, I'd rather use DOM, but I can't.
Could you use this: http://simplehtmldom.sourceforge.net/?
Interesting.
Although I can't use DOM or Tidy (because they're normally built in,
but TPTB
9 matches
Mail list logo