Re: [xml] output suppression



On Wed, Mar 19, 2003 at 02:51:25PM +0200, Vladimir Zykov wrote:
Hi,

  I'm  very  new  to  libxml. I tried to find an answer to my question
  in  the  mailing  list  archive  but  I  couldn't find anything. The
  problem  is  the following. I tried one of the examples. If the file
  src.xml is not present then I got a warning:
  `warning: failed to load external entity "src.xml"'.
  Is there any   way  to suppress this message if I, for example, want
  to report any errors only from within of my code? 

  see libxml/xmlerror.h 

typedef void (*xmlGenericErrorFunc) (void *ctx,
                                     const char *msg,
                                     ...);
void    xmlSetGenericErrorFunc  (void *ctx,
                                 xmlGenericErrorFunc handler);
to redirrect error output to your own routine.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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