Forum: Ruby libxml: handling parse errors

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D7f35c4eeff902adf48cfb4c46d6655b?d=identicon&s=25 Mage (Guest)
on 2006-03-17 14:22
(Received via mailing list)

I found the libxml API very nice, so I started using it.

When I try to open a non-well-formed xml, two things happen:
- errors are displayed on screen (stderr)
- exception raises

Well, I would like to catch the error messages instead of displaying
them. After reading the documentation, all my ideas faded away (except
hacking stderr which is not I want to do).

Could you help please?

A9b6a93b860020caf9d2d1d58c32478f?d=identicon&s=25 Ross Bamford (Guest)
on 2006-03-17 15:03
(Received via mailing list)
On Fri, 2006-03-17 at 22:20 +0900, Mage wrote:
We have a (contributed) patch that addresses this (allows an error proc
to be used) that will certainly make the next libxml-ruby release. I
won't post it here since it's yet to be merged with the new code.
This topic is locked and can not be replied to.