Re: [xml-bindings]libxml2 python error messages



On Sun, Sep 22, 2002 at 11:52:44PM +0200, Jean-Baptiste Quenot wrote:
> Hi,
> 
> I'm using intensively the Python  bindings for libxml2 and libxslt.  The
> major problem I  encounter is that error messages are  written to stdout
> while I'm running in CGI mode: it breaks the HTTP response.  How could I
> suppress  output of  errors  in  stdout?  I  noticed  that changing  the

  What kind of error message. Can you chexk the examples, you can redirrect
the error messages to your own handler.

> Python's stdout  is not sufficient,  because I guess these  messages are
> printed from the C library.

  You must set your own python error handler !

> Also, it  would be great to  have a function like  saveResultToString in
> libxslt because serialize()  is e.g. not able to  produce angle brackets
> in text nodes.

  Which is perfectly normal, that's not possible in XML !
Serializing is saving the result to a string, following the XML (or HTML) 
conventions, of course ...

> Any input will be appreciated on the first problem.

  Read the examples !
    libxml2/python/tests/error.py

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]